aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-10-21 10:18:24 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2016-03-14 12:13:31 -0400
commit76a76321d2f36992178ddaaf4d023c5e33c14fbf (patch)
tree05e6af5410f7cb9bd2f75d41bf14ff394df09c33 /src/main.cpp
parent5de2baa138cda501038a4558bc169b2cfe5b7d6b (diff)
downloadbitcoin-76a76321d2f36992178ddaaf4d023c5e33c14fbf.tar.xz
Remove work limit in UpdateForDescendants()
The work limit served to prevent the descendant walking algorithm from doing too much work by marking the parent transaction as dirty. However to implement ancestor tracking, it's not possible to similarly mark those descendant transactions as dirty without having to calculate them to begin with. This commit removes the work limit altogether. With appropriate chain limits (-limitdescendantcount) the concern about doing too much work inside this function should be mitigated.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d5254806ad..7a69d96668 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1194,20 +1194,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.
//