prev block not found - changed to behaving of 0
This commit is contained in:
parent
c8b9237af1
commit
06fcb7333a
@ -3137,7 +3137,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
|
|||||||
if (hash != Params().HashGenesisBlock()) {
|
if (hash != Params().HashGenesisBlock()) {
|
||||||
BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
|
BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
|
||||||
if (mi == mapBlockIndex.end())
|
if (mi == mapBlockIndex.end())
|
||||||
return state.DoS(10, error("%s : prev block not found", __func__), 0, "bad-prevblk");
|
return state.DoS(0, error("%s : prev block not found", __func__), 0, "bad-prevblk");
|
||||||
pindexPrev = (*mi).second;
|
pindexPrev = (*mi).second;
|
||||||
if (pindexPrev->nStatus & BLOCK_FAILED_MASK)
|
if (pindexPrev->nStatus & BLOCK_FAILED_MASK)
|
||||||
return state.DoS(100, error("%s : prev block invalid", __func__), REJECT_INVALID, "bad-prevblk");
|
return state.DoS(100, error("%s : prev block invalid", __func__), REJECT_INVALID, "bad-prevblk");
|
||||||
|
Loading…
Reference in New Issue
Block a user