This is the first two commits from #25574, leaving out all changes to -verifychain
error-handling :
- The Problem of 25563 is that when we skip blocks at level 3 due to an insufficient dbcache (skipping some
DisconnectBlock()
calls), we would still attempt the level 4 checks, attempting to reconnect a block that was never disconnected, leading to an assert inConnectBlock()
. Fix this by not attempting level 4 checks in this case. - Logging of verification progress is now split over multiple lines. This is more verbose, but now each update has its own timestamp, and other threads logging concurrently will no longer lead to mangled output.
This can be tested with a small dbcache
value, for example:
bitcoind -signet -dbcache=10
bitcoin-cli -signet verifychain 4 1000
Fixes #25563