mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-18 15:52:50 +02:00
refactor: Remove nMyStartingHeight from CNode/Connman
This commit is contained in:
@ -690,7 +690,7 @@ void PeerManager::PushNodeVersion(CNode& pnode, int64_t nTime)
|
||||
// peer.
|
||||
ServiceFlags nLocalNodeServices = pnode.GetLocalServices();
|
||||
uint64_t nonce = pnode.GetLocalNonce();
|
||||
int nNodeStartingHeight = pnode.GetMyStartingHeight();
|
||||
const int nNodeStartingHeight{m_best_height};
|
||||
NodeId nodeid = pnode.GetId();
|
||||
CAddress addr = pnode.addr;
|
||||
|
||||
@ -1294,8 +1294,9 @@ void PeerManager::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_
|
||||
* Update our best height and announce any block hashes which weren't previously
|
||||
* in ::ChainActive() to our peers.
|
||||
*/
|
||||
void PeerManager::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
|
||||
m_connman.SetBestHeight(pindexNew->nHeight);
|
||||
void PeerManager::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload)
|
||||
{
|
||||
m_best_height = pindexNew->nHeight;
|
||||
SetServiceFlagsIBDCache(!fInitialDownload);
|
||||
|
||||
// Don't relay inventory during initial block download.
|
||||
|
Reference in New Issue
Block a user