HomePhabricator

Expedite removal of tx requests that are no longer needed

Description

Expedite removal of tx requests that are no longer needed

Summary:

Whenever a transaction is added to the mempool or orphan pool, both
its txid and wtxid are considered AlreadyHave, and thus will eventually
be removed from m_txrequest.

The same is true for hashes added to the reject filter, but note that
sometimes only the wtxid is added (in which case only the wtxid can be
removed from m_txrequest).

Partial backport of core#19988:
https://github.com/bitcoin/bitcoin/pull/19988/commits/173a1d2d3f824b83777ac713e89bee69fd87692d

Depends on D9551.

Test Plan:

ninja all check-all
./test/functional/test_runner.py p2p_tx_download

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D9552

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Sep 23 2020, 23:39
FabienCommitted on May 20 2021, 15:15
FabienPushed on May 20 2021, 15:15
Reviewer
Restricted Project
Differential Revision
D9552: Expedite removal of tx requests that are no longer needed
Parents
rABC530648e3d421: Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers
Branches
Unknown
Tags
Unknown