aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-01-09 14:30:43 -0500
committerMatt Corallo <git@bluematt.me>2017-01-10 14:48:42 -0500
commit863edb45b9841c3058e883015c7576e6f69e3cc6 (patch)
tree335a844cde6814b6d6ee4f5a67904aabf9943a59
parent7f8c8cab1e537809848088d3bfaa13ecca7ac8cc (diff)
downloadbitcoin-863edb45b9841c3058e883015c7576e6f69e3cc6.tar.xz
Consider all (<100k memusage) txn for compact-block-extra-txn cache
-rw-r--r--src/net_processing.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index bdcfacc06a..6025615e44 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1741,7 +1741,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// See https://github.com/bitcoin/bitcoin/issues/8279 for details.
assert(recentRejects);
recentRejects->insert(tx.GetHash());
- }
+ if (RecursiveDynamicUsage(*ptx) < 100000)
+ AddToCompactExtraTransactions(ptx);
+ } else if (tx.HasWitness() && RecursiveDynamicUsage(*ptx) < 100000)
+ AddToCompactExtraTransactions(ptx);
if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) {
// Always relay transactions received from whitelisted peers, even