HomePhabricator

validation: return VerifyDBResult::INTERRUPTED if verification was interrupted

Description

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

Details

Provenance
Martin Zumsande <mzumsande@gmail.com>Authored on Feb 16 2023, 21:54
PiRKCommitted on Dec 7 2023, 16:25
PiRKPushed on Dec 7 2023, 16:25
Reviewer
Restricted Project
Differential Revision
D14927: validation: return VerifyDBResult::INTERRUPTED if verification was interrupted
Parents
rABCed73e8a46183: validation: Change return value of VerifyDB to enum type
Branches
Unknown
Tags
Unknown