HomePhabricator

Reconsider checkpointed block at startup.

Description

Reconsider checkpointed block at startup.

Summary:
Because we know checkpoints are valid blocks, a checkpointed block marked as invalid is an obvious indication that something went wrogn in this datadir, such as running an incompatible node client.

In order to fix this, we make sure to reconsider heckpointed blocks at startup if necessary.

Test Plan:
Run a node.

bitcoin-cli invalidateblock 00000000000000000033dfef1fc2d6a5d5520b078c55193a9bf498c5b27530f7

The node reorg a fe days of blockw away.

Restart the node and monitor the logs for.

Reconsidering checkpointed block 00000000000000000033dfef1fc2d6a5d5520b078c55193a9bf498c5b27530f7 ...

And verify that the node sync back to the tip of the chain.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Subscribers: majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6145

Details