8
3
I've created a regtest network consisting of 2 nodes - node0 & node1.
I'd like to have a fork on the common blockchain and seemingly achieved it by doing so:
- nodes start
- node0 adds node1 via
addnode - node0 generates 1 block with hash 4dac...
- node1 generates 1 block with hash 5d8b...
- node0 invalidates node0's block with hash 5d8b... via
invalidate <hash> - node1 stops
- node0 generates 1 block with hash 64f2...
- node1 restarts
- node1 generates 1 block with hash 5sfg...
- node0:
getchaintipsreturns an array with invalidated block's hash 5d8b... with status
Now my questions:
a) How can I achieve a "valid-fork" status in the output of getchaintips for the previously invalidated fork? [SOLVED]
1
Did you had a look at: https://github.com/bitcoin/bitcoin/blob/master/qa/rpc-tests/getchaintips.py?
– Jonas Schnelli – 2015-05-11T12:38:16.530@JonasSchnelli: Yes i looked at that code but didn't understand much since I'm not familiar with python..but one difference is there between my scenario and the scenario described inside the code: I have subbranches of same lengths and the code describes branches of different lengths..is this the key point? – Aliakbar Ahmadi – 2015-05-14T10:41:02.923