Skip to content

Commit 863edb4

Browse files
committed
Consider all (<100k memusage) txn for compact-block-extra-txn cache
1 parent 7f8c8ca commit 863edb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/net_processing.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
17411741
// See https://github.com/bitcoin/bitcoin/issues/8279 for details.
17421742
assert(recentRejects);
17431743
recentRejects->insert(tx.GetHash());
1744-
}
1744+
if (RecursiveDynamicUsage(*ptx) < 100000)
1745+
AddToCompactExtraTransactions(ptx);
1746+
} else if (tx.HasWitness() && RecursiveDynamicUsage(*ptx) < 100000)
1747+
AddToCompactExtraTransactions(ptx);
17451748

17461749
if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) {
17471750
// Always relay transactions received from whitelisted peers, even

0 commit comments

Comments
 (0)