@@ -1894,7 +1894,7 @@ static void RelayAddress(const CNode &originator, const CAddress &addr,
1894
1894
connman.ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
1895
1895
}
1896
1896
1897
- static void ProcessGetBlockData (const Config &config, CNode &pfrom,
1897
+ static void ProcessGetBlockData (const Config &config, CNode &pfrom, Peer &peer,
1898
1898
const CInv &inv, CConnman &connman,
1899
1899
const std::atomic<bool > &interruptMsgProc) {
1900
1900
const Consensus::Params &consensusParams =
@@ -2057,15 +2057,15 @@ static void ProcessGetBlockData(const Config &config, CNode &pfrom,
2057
2057
2058
2058
// Trigger the peer node to send a getblocks request for the next batch
2059
2059
// of inventory.
2060
- if (hash == pfrom. hashContinue ) {
2060
+ if (hash == peer. m_continuation_block ) {
2061
2061
// Send immediately. This must send even if redundant, and
2062
2062
// we want it right after the last block so they don't wait for
2063
2063
// other stuff first.
2064
2064
std::vector<CInv> vInv;
2065
2065
vInv.push_back (
2066
2066
CInv (MSG_BLOCK, ::ChainActive ().Tip ()->GetBlockHash ()));
2067
2067
connman.PushMessage (&pfrom, msgMaker.Make (NetMsgType::INV, vInv));
2068
- pfrom. hashContinue = BlockHash ();
2068
+ peer. m_continuation_block = BlockHash ();
2069
2069
}
2070
2070
}
2071
2071
}
@@ -2257,7 +2257,8 @@ static void ProcessGetData(const Config &config, CNode &pfrom, Peer &peer,
2257
2257
if (it != peer.m_getdata_requests .end () && !pfrom.fPauseSend ) {
2258
2258
const CInv &inv = *it++;
2259
2259
if (inv.IsGenBlkMsg ()) {
2260
- ProcessGetBlockData (config, pfrom, inv, connman, interruptMsgProc);
2260
+ ProcessGetBlockData (config, pfrom, peer, inv, connman,
2261
+ interruptMsgProc);
2261
2262
}
2262
2263
// else: If the first item on the queue is an unknown type, we erase it
2263
2264
// and continue processing the queue on the next call.
@@ -3531,7 +3532,7 @@ void PeerManager::ProcessMessage(const Config &config, CNode &pfrom,
3531
3532
// trigger the peer to getblocks the next batch of inventory.
3532
3533
LogPrint (BCLog::NET, " getblocks stopping at limit %d %s\n " ,
3533
3534
pindex->nHeight , pindex->GetBlockHash ().ToString ());
3534
- pfrom. hashContinue = pindex->GetBlockHash ();
3535
+ peer-> m_continuation_block = pindex->GetBlockHash ();
3535
3536
break ;
3536
3537
}
3537
3538
}
0 commit comments