mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
validation: return VerifyDBResult::INTERRUPTED if verification was interrupted
This means that the -verifydb RPC will now return false if it cannot finish due to the node being shutdown.
This commit is contained in:
@@ -4146,7 +4146,7 @@ VerifyDBResult CVerifyDB::VerifyDB(
|
||||
skipped_l3_checks = true;
|
||||
}
|
||||
}
|
||||
if (ShutdownRequested()) return VerifyDBResult::SUCCESS;
|
||||
if (ShutdownRequested()) return VerifyDBResult::INTERRUPTED;
|
||||
}
|
||||
if (pindexFailure) {
|
||||
LogPrintf("Verification error: coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainstate.m_chain.Height() - pindexFailure->nHeight + 1, nGoodTransactions);
|
||||
@@ -4179,7 +4179,7 @@ VerifyDBResult CVerifyDB::VerifyDB(
|
||||
LogPrintf("Verification error: found unconnectable block at %d, hash=%s (%s)\n", pindex->nHeight, pindex->GetBlockHash().ToString(), state.ToString());
|
||||
return VerifyDBResult::CORRUPTED_BLOCK_DB;
|
||||
}
|
||||
if (ShutdownRequested()) return VerifyDBResult::SUCCESS;
|
||||
if (ShutdownRequested()) return VerifyDBResult::INTERRUPTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user