aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-08-12 11:48:28 +0100
committerJohn Newbery <john@johnnewbery.com>2020-09-07 11:13:58 +0100
commit2297b26b3ce95e935c0ebb8c38dabf19965054a5 (patch)
treea82488ad7ea7001443ef6218c2ccead6a756732a /src/init.cpp
parent824bbd1ffba3df7ffa6f5bfaa31298cd484473b1 (diff)
downloadbitcoin-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/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 633dd8cefc..e496276e10 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1376,7 +1376,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
node.chainman = &g_chainman;
ChainstateManager& chainman = *Assert(node.chainman);
- node.peer_logic.reset(new PeerLogicValidation(*node.connman, node.banman.get(), *node.scheduler, chainman, *node.mempool));
+ node.peer_logic.reset(new PeerLogicValidation(chainparams, *node.connman, node.banman.get(), *node.scheduler, chainman, *node.mempool));
RegisterValidationInterface(node.peer_logic.get());
// sanitize comments per BIP-0014, format user agent and check total size