CorruptionPossible -> BLOCK_MUTATED

Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
Matt Corallo
2019-01-18 12:56:06 +10:00
committed by Suhas Daftuar
parent 6e55b292b0
commit 9ab2a0412e
2 changed files with 5 additions and 5 deletions

View File

@@ -203,7 +203,7 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<
// but that is expensive, and CheckBlock caches a block's
// "checked-status" (in the CBlock?). CBlock should be able to
// check its own merkle root and cache that check.
if (state.CorruptionPossible())
if (state.GetReason() == ValidationInvalidReason::BLOCK_MUTATED)
return READ_STATUS_FAILED; // Possible Short ID collision
return READ_STATUS_CHECKBLOCK_FAILED;
}