From c6c7527ff99ad5a988102745eae372e23b0793b7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 23 Jul 2018 20:04:35 -1100 Subject: [PATCH] Fix --- src/miner.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index f73e93d6c..6dce2f9fa 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -165,8 +165,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount) CAmount nFees = 0; { - //LOCK2(cs_main, mempool.cs); - LOCK(cs_main); + LOCK2(cs_main, mempool.cs); CBlockIndex* pindexPrev = chainActive.LastTip(); const int nHeight = pindexPrev->nHeight + 1; uint32_t consensusBranchId = CurrentEpochBranchId(nHeight, chainparams.GetConsensus()); @@ -186,7 +185,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount) for (CTxMemPool::indexed_transaction_set::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi) { - READLOCK(mempool.cs); const CTransaction& tx = mi->GetTx(); int64_t nLockTimeCutoff = (STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)