This commit is contained in:
jl777
2019-01-24 03:28:26 -11:00
parent df9d2ddc97
commit f5ad6948fc

View File

@@ -3274,7 +3274,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
return error("AcceptBlock(): ReceivedBlockTransactions failed");
setDirtyFileInfo.insert(blockPos.nFile);
//fprintf(stderr,"added ht.%d copy of tmpfile to %d.%d\n",pindex->GetHeight(),blockPos.nFile,blockPos.nPos);
FlushStateToDisk(state, FLUSH_STATE_NONE); // we just allocated more disk space for block files
fprintf(stderr,"added ht.%d copy of tmpfile to %d.%d\n",pindex->GetHeight(),blockPos.nFile,blockPos.nPos);
}
// verify that the view's current state corresponds to the previous block
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
@@ -5217,8 +5218,8 @@ bool AcceptBlock(int32_t *futureblockp,CBlock& block, CValidationState& state, C
if (dbp == NULL)
if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart()))
AbortNode(state, "Failed to write block");
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
return error("AcceptBlock(): ReceivedBlockTransactions failed");
//if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
// return error("AcceptBlock(): ReceivedBlockTransactions failed");
pindex->nStatus |= BLOCK_IN_TMPFILE;
} catch (const std::runtime_error& e) {
return AbortNode(state, std::string("System error: ") + e.what());