1
I'm running 2 bitcoind servers on the same machine, called node0 and node1.
In the following I'm listing steps I take and results I get and I'm wondering what is causing one node nullifying other node's balance by block generation?
- Started two independent (by independent configuration files) servers
- node0 generates 101 blocks
- node1 generates 101 blocks
- each node has a balance of 50 BTC
- connected them by adding one by the other node via "addnode "localhost:port" add"
- version messages are exchanged
- getconnectioncount returns "1" on behalf of each node
- node0 generates 1 block
- node0: getbalance: 100 BTC
- node1: getbalance: 0 BTC
...trying to figure out what's happening...
- node1 generates 1 block
- node1: getbalance: 0 BTC
- node0: getbalance 150 BTC
- node1 generates 100 blocks
- node1: getbalance: 50 BTC
- node0: getbalance: 5100 BTC
I guess this problem has to do with an error I get after generation of blocks - see my corresponding question here.
Or is it because of the settled connection which causes a conflict on which blockchain to work on and thus abandonning one node's blockchain - in this case, abandonning node1's blockchain?
Thanks! But does it make sense to earn bitcoins without generating any blocks? Because apperently, node0, in this case, is earning the reward from the blocks node1 generates!? Or am I misunderstanding/missing something? – Aliakbar Ahmadi – 2015-05-03T22:00:42.027
You are misunderstanding. In step 11, node1 generates block number 103. This is the 100th block on top of block number 3, whose coinbase matures at that point. This makes block number 3's generated coin (which belongs to node0, not node1), spendable. – Pieter Wuille – 2015-05-04T09:24:32.360
Ah ok, of course, because both bodes work on node0's blockchain. Thanks! – Aliakbar Ahmadi – 2015-05-04T09:34:29.720