validation: return VerifyDBResult::INTERRUPTED if verification was interrupted
Summary:
This means that the verifydb RPC will now return false if it cannot finish due to the node being shutdown.
This also avoids a misleading block index loadtime log entry in init.
This is a partial backport of core#25574 and core#27157
https://github.com/bitcoin/bitcoin/pull/25574/commits/d6f781f1cfcbc2c2ad5ee289a0642ed00386d013
https://github.com/bitcoin/bitcoin/pull/27157/commits/7dff7da4f5eafa89546565a63362e57516e4064e
Depends on D14926
Test Plan:
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
src/bitcoind checkblocks
Press Ctrl-C, check that it still exits gracefully and does not print a success message for the block verification or block loading.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14927