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