Browse Source

Merge #7828: Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage()

bf477bc Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() (Jorge Timón)
0.13
Pieter Wuille 9 years ago
parent
commit
514993554c
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931
  1. 5
      src/main.cpp

5
src/main.cpp

@ -4499,9 +4499,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam @@ -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) @@ -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)

Loading…
Cancel
Save