diff --git a/src/main.cpp b/src/main.cpp index 2aad3b9bb..e02ec515b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2845,7 +2845,7 @@ namespace { hasher << hashBlock; hasher << blockundo; fileout << hasher.GetHash(); - +fprintf(stderr,"hashBlock.%s hasher.%s\n",hashBlock.GetHex().c_str(),hasher.GetHash().GetHex().c_str()); return true; } @@ -2870,7 +2870,7 @@ namespace { hasher << hashBlock; hasher << blockundo; if (hashChecksum != hasher.GetHash()) - return error("%s: Checksum mismatch %s vs %s", __func__,hashChecksum.GetHex().c_str(),hasher.GetHash().GetHex().c_str()); + return error("%s: %s Checksum mismatch %s vs %s", __func__,hashBlock.GetHex().c_str(),hashChecksum.GetHex().c_str(),hasher.GetHash().GetHex().c_str()); return true; } @@ -3634,6 +3634,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin return true; // Write undo information to disk + fprintf(stderr,"isNull %d vs isvalid %d nStatus %x\n",pindex->GetUndoPos().IsNull(),pindex->IsValid(BLOCK_VALID_SCRIPTS),(uint32_t)pindex->nStatus); if (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS)) { if (pindex->GetUndoPos().IsNull()) { @@ -3644,7 +3645,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin fprintf(stderr,"ConnectBlock: unexpected null pprev\n"); if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash(), chainparams.MessageStart())) return AbortNode(state, "Failed to write undo data"); - // update nUndoPos in block index pindex->nUndoPos = pos.nPos; pindex->nStatus |= BLOCK_HAVE_UNDO;