HomePhabricator

net_processing: move FindTxForGetData and ProcessGetData to PeerManagerImpl

Description

net_processing: move FindTxForGetData and ProcessGetData to PeerManagerImpl

Summary:
Allows making mapRelay and vRelayExpiration members rather than globals.
Remove need to pass mempool of conman to methods?

This is a backport of core#20942 [6&7/9]
https://github.com/bitcoin/bitcoin/pull/20942/commits/34207b9004d2069a8fcb32758cd796143eccfb4d
https://github.com/bitcoin/bitcoin/pull/20942/commits/7b7117efd00acf7609e65d3b4fe5f76e400dda12

Depends on D11435

Notes :

  • also convert a uint256 to TxId in mapRelay type
  • rename g_relay_expiration to vRelayExpiration now that it is no longer a global (undoes a change in D10914). The m_ prefix is not very commonly used in this class, so I feel like it is best to stick with the source material.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on May 6 2022, 15:01
PiRKPushed on May 10 2022, 15:13
Reviewer
Restricted Project
Differential Revision
D11436: net_processing: move FindTxForGetData and ProcessGetData to PeerManagerImpl
Parents
rABC3e0b98aeda72: net_processing: move MarkBlockAs*, TipMayBeStale, FindNextBlocksToDL to…
Branches
Unknown
Tags
Unknown