I'm trying to setup a local testnet with multiple nodes. Currently I have three nodes, and their mining powers are almost the same.
Things have been quite ok so far, except some problems that I need to ask from you.
When I run the
getblocktemplate
rpc call (because I later want to run a pool), it returns the message as in the title. For example:./src/bitcoin-cli -datadir=./localnet getblocktemplate error: {"code":-10,"message":"Bitcoin is downloading blocks..."}
although there are already 10 blocks in the blockchain maintained by the node. Its the same for other nodes as well. So why does that happen?
- The nodes do not sync up very often although they are all connected together (each node has 2 inbound connections and 2 outbound connections). It is so often that one node is 2 block ahead of other and remains so for a long time. Thus, again, why does that happen? I thought after finding a valid block, the node will broadcast that to every connected node and the network will work on top of that block?
Please let me know if you can help answer either one or all the questions.