Page MenuHomePhabricator

net_processing: move MarkBlockAs*, TipMayBeStale, FindNextBlocksToDL to PeerManagerImpl
ClosedPublic

Authored by PiRK on May 6 2022, 15:51.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.May 6 2022, 15:51

remove duplicated doxygen doc

Fabien requested changes to this revision.May 9 2022, 09:54
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/net_processing.cpp
771 ↗(On Diff #33440)

Still needed ?

This revision now requires changes to proceed.May 9 2022, 09:54

remove unused chainParams parameter

This revision is now accepted and ready to land.May 10 2022, 10:01