Better error message when hashPrevBlock != view.GetBestBlock
This commit is contained in:
@@ -3243,7 +3243,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
|
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
|
||||||
if ( hashPrevBlock != view.GetBestBlock() )
|
if ( hashPrevBlock != view.GetBestBlock() )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"ConnectBlock(): hashPrevBlock != view.GetBestBlock()\n");
|
fprintf(stderr,"ConnectBlock(): hashPrevBlock != view.GetBestBlock() %s != %s\n", hashPrevBlock.ToString().c_str(), view.GetBestBlock().ToString().c_str() );
|
||||||
|
|
||||||
return state.DoS(1, error("ConnectBlock(): hashPrevBlock != view.GetBestBlock()"),
|
return state.DoS(1, error("ConnectBlock(): hashPrevBlock != view.GetBestBlock()"),
|
||||||
REJECT_INVALID, "hashPrevBlock-not-bestblock");
|
REJECT_INVALID, "hashPrevBlock-not-bestblock");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user