Skip to content

Commit 6345f0b

Browse files
Remove unused argument from MarkBlockAsInFlight(...)
1 parent 75171f0 commit 6345f0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/net_processing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ bool MarkBlockAsReceived(const uint256& hash) {
333333
// Requires cs_main.
334334
// returns false, still setting pit, if the block was already in flight from the same peer
335335
// 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) {
337337
CNodeState *state = State(nodeid);
338338
assert(state != NULL);
339339

@@ -2064,7 +2064,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
20642064
if ((!fAlreadyInFlight && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) ||
20652065
(fAlreadyInFlight && blockInFlightIt->second.first == pfrom->GetId())) {
20662066
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)) {
20682068
if (!(*queuedBlockIt)->partialBlock)
20692069
(*queuedBlockIt)->partialBlock.reset(new PartiallyDownloadedBlock(&mempool));
20702070
else {
@@ -2368,7 +2368,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
23682368
}
23692369
uint32_t nFetchFlags = GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus());
23702370
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);
23722372
LogPrint(BCLog::NET, "Requesting block %s from peer=%d\n",
23732373
pindex->GetBlockHash().ToString(), pfrom->id);
23742374
}
@@ -3223,7 +3223,7 @@ bool SendMessages(CNode* pto, CConnman& connman, const std::atomic<bool>& interr
32233223
BOOST_FOREACH(const CBlockIndex *pindex, vToDownload) {
32243224
uint32_t nFetchFlags = GetFetchFlags(pto, pindex->pprev, consensusParams);
32253225
vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
3226-
MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex);
3226+
MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), pindex);
32273227
LogPrint(BCLog::NET, "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
32283228
pindex->nHeight, pto->id);
32293229
}

0 commit comments

Comments
 (0)