I am presently implementing the rpc name invalidateblock on btcd, an alternate Bitcoin full node implementation. I am attempting to determine how Bitcoin Core handles department choice on reorganizations with invalidateblock.
Say there’s 3 chaintips like so:
genesis -> 1 -> 2 -> 3 (energetic) (chainwork=8)
-> 1a (valid-fork) (chainwork=4)
-> 1b (valid-fork) (chainwork=6)
Blocks at peak 1 had been acquired within the order of: 1, 1a, 1b. Block 1 was acquired most lately and block 1b was acquired final.
If I name invalidateblock on block 2, which block will change into the energetic chaintip?
