Open luke-jr opened 5 years ago
These blocks are re-evaluated ever N seconds(2 minute default). see qa/rpc-tests/feature_fedpeg.py
for the test case covering this by setting it to 15 seconds and making sure it recovers.
-recheckpeginblockinterval=15
IsValidPeginWitness
is used from at leastGetTransactionSigOpCost
andCheckTxInputs
to determine block validity, the result of which can cause a block to be marked invalid permanently, and never reconsidered later.But this is a problem because it calls
IsConfirmedBitcoinBlock
which can return true or false depending on the state of the linked Bitcoin node. The Bitcoin node might be behind, causing the block to be marked as invalid, and never reconsidered later when the Bitcoin node catches up. (Or an actually-invalid block might become valid as the Bitcoin blockchain grows, but this shouldn't happen in reality.)