diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-03-17 13:33:31 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-03-17 13:33:54 +0100 |
commit | 01f42676236b7d2ea9b918d49ac6e594259062c8 (patch) | |
tree | 9648da291b9e0986393b4f77cd865c278c39de44 /src/main.cpp | |
parent | 14d6324a248df50cb79fbeb5b60a978687a3b64e (diff) | |
parent | ce019bf90fe89c1256a89c489795987ef0b8a18f (diff) | |
download | bitcoin-01f42676236b7d2ea9b918d49ac6e594259062c8.tar.xz |
Merge #7594: Mempool: Add tracking of ancestor packages
ce019bf Check all ancestor state in CTxMemPool::check() (Suhas Daftuar)
e2eeb5d Add ancestor feerate index to mempool (Suhas Daftuar)
72abd2c Add ancestor tracking to mempool (Suhas Daftuar)
76a7632 Remove work limit in UpdateForDescendants() (Suhas Daftuar)
5de2baa Rename CTxMemPool::remove -> removeRecursive (Suhas Daftuar)
7659438 CTxMemPool::removeForBlock now uses RemoveStaged (Suhas Daftuar)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main.cpp b/src/main.cpp index 76dc01ea79..924c2f9e0c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1245,20 +1245,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // Save these to avoid repeated lookups setIterConflicting.insert(mi); - // If this entry is "dirty", then we don't have descendant - // state for this transaction, which means we probably have - // lots of in-mempool descendants. - // Don't allow replacements of dirty transactions, to ensure - // that we don't spend too much time walking descendants. - // This should be rare. - if (mi->IsDirty()) { - return state.DoS(0, false, - REJECT_NONSTANDARD, "too many potential replacements", false, - strprintf("too many potential replacements: rejecting replacement %s; cannot replace tx %s with untracked descendants", - hash.ToString(), - mi->GetTx().GetHash().ToString())); - } - // Don't allow the replacement to reduce the feerate of the // mempool. // @@ -1388,7 +1374,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C FormatMoney(nModifiedFees - nConflictingFees), (int)nSize - (int)nConflictingSize); } - pool.RemoveStaged(allConflicting); + pool.RemoveStaged(allConflicting, false); // Store transaction in memory pool.addUnchecked(hash, entry, setAncestors, !IsInitialBlockDownload()); @@ -2553,7 +2539,7 @@ bool static DisconnectTip(CValidationState& state, const Consensus::Params& cons list<CTransaction> removed; CValidationState stateDummy; if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL, true)) { - mempool.remove(tx, removed, true); + mempool.removeRecursive(tx, removed); } else if (mempool.exists(tx.GetHash())) { vHashUpdate.push_back(tx.GetHash()); } |