Skip to content

Commit c4dd07f

Browse files
committed
Validation: rename one of the two instances using "bad-prevblk" to its correct description of "prevblk-not-found"
Github-Pull: #2290 Rebased-From: f68251d
1 parent 39f6eaf commit c4dd07f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/validation.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,8 +2949,10 @@ bool GetPrevIndex(const CBlock& block, CBlockIndex** pindexPrevRet, CValidationS
29492949
pindexPrev = nullptr;
29502950
if (block.GetHash() != Params().GetConsensus().hashGenesisBlock) {
29512951
BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
2952-
if (mi == mapBlockIndex.end())
2953-
return state.DoS(0, error("%s : prev block %s not found", __func__, block.hashPrevBlock.GetHex()), 0, "bad-prevblk");
2952+
if (mi == mapBlockIndex.end()) {
2953+
return state.DoS(0, error("%s : prev block %s not found", __func__, block.hashPrevBlock.GetHex()), 0,
2954+
"prevblk-not-found");
2955+
}
29542956
pindexPrev = (*mi).second;
29552957
if (pindexPrev->nStatus & BLOCK_FAILED_MASK) {
29562958
//If this "invalid" block is an exact match from the checkpoints, then reconsider it

0 commit comments

Comments
 (0)