@@ -312,7 +312,7 @@ class PeerManagerImpl final : public PeerManager
312312 /* * Implement PeerManager */
313313 void StartScheduledTasks (CScheduler& scheduler) override ;
314314 void CheckForStaleTipAndEvictPeers () override ;
315- bool FetchBlock (NodeId id, const uint256& hash, const CBlockIndex& index ) override ;
315+ bool FetchBlock (NodeId id, const CBlockIndex& block_index ) override ;
316316 bool GetNodeStateStats (NodeId nodeid, CNodeStateStats& stats) const override ;
317317 bool IgnoresIncomingTxs () override { return m_ignore_incoming_txs; }
318318 void SendPings () override ;
@@ -1428,7 +1428,7 @@ bool PeerManagerImpl::BlockRequestAllowed(const CBlockIndex* pindex)
14281428 (GetBlockProofEquivalentTime (*pindexBestHeader, *pindex, *pindexBestHeader, m_chainparams.GetConsensus ()) < STALE_RELAY_AGE_LIMIT);
14291429}
14301430
1431- bool PeerManagerImpl::FetchBlock (NodeId id, const uint256& hash, const CBlockIndex& index )
1431+ bool PeerManagerImpl::FetchBlock (NodeId id, const CBlockIndex& block_index )
14321432{
14331433 if (fImporting || fReindex ) return false ;
14341434
@@ -1440,9 +1440,10 @@ bool PeerManagerImpl::FetchBlock(NodeId id, const uint256& hash, const CBlockInd
14401440 if (!state->fHaveWitness ) return false ;
14411441
14421442 // Mark block as in-flight unless it already is
1443- if (!BlockRequested (id, index )) return false ;
1443+ if (!BlockRequested (id, block_index )) return false ;
14441444
14451445 // Construct message to request the block
1446+ const uint256& hash{block_index.GetBlockHash ()};
14461447 std::vector<CInv> invs{CInv (MSG_BLOCK | MSG_WITNESS_FLAG, hash)};
14471448
14481449 // Send block request message to the peer
0 commit comments