From f5ad6948fcb2690df7ca03c0872b0160b095df51 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 24 Jan 2019 03:28:26 -1100 Subject: [PATCH] -recvtx --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bfb1a0535..71c04aa56 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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());