diff options
author | John Newbery <john@johnnewbery.com> | 2020-08-12 11:48:28 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2020-09-07 11:13:58 +0100 |
commit | 2297b26b3ce95e935c0ebb8c38dabf19965054a5 (patch) | |
tree | a82488ad7ea7001443ef6218c2ccead6a756732a /src/test/util | |
parent | 824bbd1ffba3df7ffa6f5bfaa31298cd484473b1 (diff) | |
download | bitcoin-2297b26b3ce95e935c0ebb8c38dabf19965054a5.tar.xz |
[net_processing] Pass chainparams to PeerLogicValidation constructor
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.
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 536a131313..a9752f8887 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -169,7 +169,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const m_node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME); m_node.connman = MakeUnique<CConnman>(0x1337, 0x1337); // Deterministic randomness for tests. - m_node.peer_logic = MakeUnique<PeerLogicValidation>(*m_node.connman, m_node.banman.get(), *m_node.scheduler, *m_node.chainman, *m_node.mempool); + m_node.peer_logic = MakeUnique<PeerLogicValidation>(chainparams, *m_node.connman, m_node.banman.get(), *m_node.scheduler, *m_node.chainman, *m_node.mempool); { CConnman::Options options; options.m_msgproc = m_node.peer_logic.get(); |