@@ -1475,7 +1475,7 @@ static void RelayAddress(const CNode& originator,
14751475 connman.ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
14761476}
14771477
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)
14791479{
14801480 bool send = false ;
14811481 std::shared_ptr<const CBlock> a_recent_block;
@@ -1616,15 +1616,14 @@ void static ProcessGetBlockData(CNode& pfrom, const CChainParams& chainparams, c
16161616 }
16171617
16181618 // 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 ) {
16211620 // Send immediately. This must send even if redundant,
16221621 // and we want it right after the last block so they don't
16231622 // wait for other stuff first.
16241623 std::vector<CInv> vInv;
16251624 vInv.push_back (CInv (MSG_BLOCK, ::ChainActive ().Tip ()->GetBlockHash ()));
16261625 connman.PushMessage (&pfrom, msgMaker.Make (NetMsgType::INV, vInv));
1627- pfrom. hashContinue .SetNull ();
1626+ peer. m_continuation_block .SetNull ();
16281627 }
16291628 }
16301629}
@@ -1724,7 +1723,7 @@ void static ProcessGetData(CNode& pfrom, Peer& peer, const CChainParams& chainpa
17241723 if (it != peer.m_getdata_requests .end () && !pfrom.fPauseSend ) {
17251724 const CInv &inv = *it++;
17261725 if (inv.IsGenBlkMsg ()) {
1727- ProcessGetBlockData (pfrom, chainparams, inv, connman);
1726+ ProcessGetBlockData (pfrom, peer, chainparams, inv, connman);
17281727 }
17291728 // else: If the first item on the queue is an unknown type, we erase it
17301729 // and continue processing the queue on the next call.
@@ -2805,7 +2804,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
28052804 // When this block is requested, we'll send an inv that'll
28062805 // trigger the peer to getblocks the next batch of inventory.
28072806 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 ();
28092808 break ;
28102809 }
28112810 }
0 commit comments