@@ -1475,7 +1475,7 @@ static void RelayAddress(const CNode& originator,
1475
1475
connman.ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
1476
1476
}
1477
1477
1478
- void static ProcessGetBlockData (CNode& pfrom, const CChainParams& chainparams, const CInv& inv, CConnman& connman)
1478
+ void static ProcessGetBlockData (CNode& pfrom, Peer& peer, const CChainParams& chainparams, const CInv& inv, CConnman& connman)
1479
1479
{
1480
1480
bool send = false ;
1481
1481
std::shared_ptr<const CBlock> a_recent_block;
@@ -1616,15 +1616,14 @@ void static ProcessGetBlockData(CNode& pfrom, const CChainParams& chainparams, c
1616
1616
}
1617
1617
1618
1618
// Trigger the peer node to send a getblocks request for the next batch of inventory
1619
- if (inv.hash == pfrom.hashContinue )
1620
- {
1619
+ if (inv.hash == peer.m_continuation_block ) {
1621
1620
// Send immediately. This must send even if redundant,
1622
1621
// and we want it right after the last block so they don't
1623
1622
// wait for other stuff first.
1624
1623
std::vector<CInv> vInv;
1625
1624
vInv.push_back (CInv (MSG_BLOCK, ::ChainActive ().Tip ()->GetBlockHash ()));
1626
1625
connman.PushMessage (&pfrom, msgMaker.Make (NetMsgType::INV, vInv));
1627
- pfrom. hashContinue .SetNull ();
1626
+ peer. m_continuation_block .SetNull ();
1628
1627
}
1629
1628
}
1630
1629
}
@@ -1724,7 +1723,7 @@ void static ProcessGetData(CNode& pfrom, Peer& peer, const CChainParams& chainpa
1724
1723
if (it != peer.m_getdata_requests .end () && !pfrom.fPauseSend ) {
1725
1724
const CInv &inv = *it++;
1726
1725
if (inv.IsGenBlkMsg ()) {
1727
- ProcessGetBlockData (pfrom, chainparams, inv, connman);
1726
+ ProcessGetBlockData (pfrom, peer, chainparams, inv, connman);
1728
1727
}
1729
1728
// else: If the first item on the queue is an unknown type, we erase it
1730
1729
// and continue processing the queue on the next call.
@@ -2805,7 +2804,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
2805
2804
// When this block is requested, we'll send an inv that'll
2806
2805
// trigger the peer to getblocks the next batch of inventory.
2807
2806
LogPrint (BCLog::NET, " getblocks stopping at limit %d %s\n " , pindex->nHeight , pindex->GetBlockHash ().ToString ());
2808
- pfrom. hashContinue = pindex->GetBlockHash ();
2807
+ peer-> m_continuation_block = pindex->GetBlockHash ();
2809
2808
break ;
2810
2809
}
2811
2810
}
0 commit comments