mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
refactor: Remove nMyStartingHeight from CNode/Connman
This commit is contained in:
parent
ae8f797135
commit
faaa4f2b6a
12 changed files with 33 additions and 55 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue