@@ -333,7 +333,7 @@ bool MarkBlockAsReceived(const uint256& hash) {
333
333
// Requires cs_main.
334
334
// returns false, still setting pit, if the block was already in flight from the same peer
335
335
// pit will only be valid as long as the same cs_main lock is being held
336
- bool MarkBlockAsInFlight (NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, const CBlockIndex* pindex = NULL , std::list<QueuedBlock>::iterator** pit = NULL ) {
336
+ bool MarkBlockAsInFlight (NodeId nodeid, const uint256& hash, const CBlockIndex* pindex = NULL , std::list<QueuedBlock>::iterator** pit = NULL ) {
337
337
CNodeState *state = State (nodeid);
338
338
assert (state != NULL );
339
339
@@ -2064,7 +2064,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
2064
2064
if ((!fAlreadyInFlight && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) ||
2065
2065
(fAlreadyInFlight && blockInFlightIt->second .first == pfrom->GetId ())) {
2066
2066
std::list<QueuedBlock>::iterator* queuedBlockIt = NULL ;
2067
- if (!MarkBlockAsInFlight (pfrom->GetId (), pindex->GetBlockHash (), chainparams. GetConsensus (), pindex, &queuedBlockIt)) {
2067
+ if (!MarkBlockAsInFlight (pfrom->GetId (), pindex->GetBlockHash (), pindex, &queuedBlockIt)) {
2068
2068
if (!(*queuedBlockIt)->partialBlock )
2069
2069
(*queuedBlockIt)->partialBlock .reset (new PartiallyDownloadedBlock (&mempool));
2070
2070
else {
@@ -2368,7 +2368,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
2368
2368
}
2369
2369
uint32_t nFetchFlags = GetFetchFlags (pfrom, pindex->pprev , chainparams.GetConsensus ());
2370
2370
vGetData.push_back (CInv (MSG_BLOCK | nFetchFlags, pindex->GetBlockHash ()));
2371
- MarkBlockAsInFlight (pfrom->GetId (), pindex->GetBlockHash (), chainparams. GetConsensus (), pindex);
2371
+ MarkBlockAsInFlight (pfrom->GetId (), pindex->GetBlockHash (), pindex);
2372
2372
LogPrint (BCLog::NET, " Requesting block %s from peer=%d\n " ,
2373
2373
pindex->GetBlockHash ().ToString (), pfrom->id );
2374
2374
}
@@ -3223,7 +3223,7 @@ bool SendMessages(CNode* pto, CConnman& connman, const std::atomic<bool>& interr
3223
3223
BOOST_FOREACH (const CBlockIndex *pindex, vToDownload) {
3224
3224
uint32_t nFetchFlags = GetFetchFlags (pto, pindex->pprev , consensusParams);
3225
3225
vGetData.push_back (CInv (MSG_BLOCK | nFetchFlags, pindex->GetBlockHash ()));
3226
- MarkBlockAsInFlight (pto->GetId (), pindex->GetBlockHash (), consensusParams, pindex);
3226
+ MarkBlockAsInFlight (pto->GetId (), pindex->GetBlockHash (), pindex);
3227
3227
LogPrint (BCLog::NET, " Requesting block %s (%d) peer=%d\n " , pindex->GetBlockHash ().ToString (),
3228
3228
pindex->nHeight , pto->id );
3229
3229
}
0 commit comments