diff --git a/src/main.cpp b/src/main.cpp index f6d6ca270..786de3397 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3243,7 +3243,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash(); 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()"), REJECT_INVALID, "hashPrevBlock-not-bestblock"); }