HomePhabricator

net_processing: move MarkBlockAs*, TipMayBeStale, FindNextBlocksToDL to…

Description

net_processing: move MarkBlockAs*, TipMayBeStale, FindNextBlocksToDL to PeerManagerImpl

Summary:
Allows converting mapBlocksInFlight and g_last_tip_update from globals to member variables, and remove need to pass mempool or consensus params to methods.

This is a backport of core#20942 [4&5/9]
https://github.com/bitcoin/bitcoin/pull/20942/commits/a490f0a056456d683dd8ef6f89a5af1a13792118
https://github.com/bitcoin/bitcoin/pull/20942/commits/d44084883adcf00f50d3d5a9e0c88e3a0b276817

Note: consensusParams is not needed in our version of FindNextBlocksToDownload. Core uses it to test IsWitnessEneabled.

Depends on D11434

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on May 6 2022, 14:33
PiRKPushed on May 10 2022, 15:13
Reviewer
Restricted Project
Differential Revision
D11435: net_processing: move MarkBlockAs*, TipMayBeStale, FindNextBlocksToDL to PeerManagerImpl
Parents
rABC77d90e8d8e93: net_processing: move AlreadyHaveTx into PeerManageImpl
Branches
Unknown
Tags
Unknown