Mempool fixes in the CC path

This commit is contained in:
jl777
2018-11-28 21:53:27 -11:00
parent b0abf90f69
commit 30eae48849
2 changed files with 3 additions and 2 deletions

View File

@@ -4678,7 +4678,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
const uint256 &hash = tx.GetHash();
if ( tx.vjoinsplit.size() == 0 ) {
transactionsToRemove.push_back(tx);
tmpmempool.addUnchecked(hash,e,!IsInitialBlockDownload());
tmpmempool.addUnchecked(hash,e,true);
}
}
BOOST_FOREACH(const CTransaction& tx, transactionsToRemove) {
@@ -4756,6 +4756,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
// here we add back all txs from the temp mempool to the main mempool.
// which removes any tx locally that were invalid after the block arrives.
int invalidtxs = 0;
LOCK(mempool.cs);
BOOST_FOREACH(const CTxMemPoolEntry& e, tmpmempool.mapTx) {
CTransaction tx = e.GetTx();
CValidationState state; bool fMissingInputs,fOverrideFees = false;