HomePhabricator

[net_processing] Pass chainparams to PeerLogicValidation constructor

Description

[net_processing] Pass chainparams to PeerLogicValidation constructor

Summary:

Keep a references to chainparams, rather than calling the global
Params() function every time it's needed. This is fine, since
globalChainParams does not get updated once it's been set, and it's
available at the point of constructing the PeerLogicValidation object.

Partial backport of core PR19791 (2/9):
https://github.com/bitcoin/bitcoin/pull/19791/commits/2297b26b3ce95e935c0ebb8c38dabf19965054a5

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Jan 22 2021, 11:04
FabienCommitted on Jan 22 2021, 11:04
abc-botPushed on Jan 22 2021, 11:10
Reviewer
Restricted Project
Differential Revision
D8942: [net_processing] Pass chainparams to PeerLogicValidation constructor
Parents
rABC0b18505550aa: [doc] Provide rationale for randomization in scheduling.
Branches
Unknown
Tags
Unknown