diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-05-13 12:49:49 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-08-03 20:56:41 +1000 |
commit | 6ec1809d33bfc42b80cb6f35625dccd56be8d507 (patch) | |
tree | 998b2936e86e414a081a42b3997825a2e4bef3cb /src/txmempool.cpp | |
parent | a70beafdb22564043dc24fc98133fdadbaf77d8a (diff) |
net_processing: drop m_recently_announced_invs bloom filter
Rather than using a bloom filter to track announced invs, simply allow
a peer to request any tx that entered the mempool prior to the last INV
message we sent them. This also obsoletes the UNCONDITIONAL_RELAY_DELAY.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 845fbdb66e..33182a9922 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -853,6 +853,17 @@ TxMempoolInfo CTxMemPool::info(const GenTxid& gtxid) const return GetInfo(i); } +TxMempoolInfo CTxMemPool::info_for_relay(const GenTxid& gtxid, uint64_t last_sequence) const +{ + LOCK(cs); + indexed_transaction_set::const_iterator i = (gtxid.IsWtxid() ? get_iter_from_wtxid(gtxid.GetHash()) : mapTx.find(gtxid.GetHash())); + if (i != mapTx.end() && i->GetSequence() < last_sequence) { + return GetInfo(i); + } else { + return TxMempoolInfo(); + } +} + void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta) { { |