diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-04-12 15:36:42 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-04-12 15:51:16 +0200 |
commit | 514993554c370f4cf30a109ac28d5d64893dbf0a (patch) | |
tree | d1f9872ac59df4263b13f95598bf9d30818364f2 /src | |
parent | 934f2b5e769368d1a2407d41d53cafd5d51e6b36 (diff) | |
parent | bf477bcc794360c145156c9e8f155e0215f70dd3 (diff) |
Merge #7828: Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage()
bf477bc Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() (Jorge Timón)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index f5c7e11d6e..9b164c7999 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4499,9 +4499,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam } } -bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived) +bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams) { - const CChainParams& chainparams = Params(); RandAddSeedPerfmon(); LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id); if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0) @@ -5511,7 +5510,7 @@ bool ProcessMessages(CNode* pfrom) bool fRet = false; try { - fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime); + fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime, chainparams); boost::this_thread::interruption_point(); } catch (const std::ios_base::failure& e) |