[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