validation: report if pruning prevents completion of verification

Now the verifychain RPC returns false if the checks didn't
finish because the blocks requested to be queried have been pruned.
This commit is contained in:
Martin Zumsande
2023-02-06 15:05:33 -05:00
parent 0c7785bb25
commit 57ef2a4812
4 changed files with 10 additions and 3 deletions

View File

@@ -194,6 +194,7 @@ ChainstateLoadResult VerifyLoadedChainstate(ChainstateManager& chainman, const C
switch (result) {
case VerifyDBResult::SUCCESS:
case VerifyDBResult::INTERRUPTED:
case VerifyDBResult::SKIPPED_MISSING_BLOCKS:
break;
case VerifyDBResult::CORRUPTED_BLOCK_DB:
return {ChainstateLoadStatus::FAILURE, _("Corrupted block database detected")};