From 27f260aa6e04f82dad78e9a06d58927546143a27 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 22 Dec 2023 10:32:37 -0300 Subject: [PATCH] net: remove now unused global 'g_initial_block_download_completed' --- src/net_processing.cpp | 1 - src/protocol.cpp | 8 -------- src/protocol.h | 4 ---- 3 files changed, 13 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 84a7f4c4d5a..9904790cea1 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2086,7 +2086,6 @@ void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::sha void PeerManagerImpl::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) { SetBestBlock(pindexNew->nHeight, std::chrono::seconds{pindexNew->GetBlockTime()}); - SetServiceFlagsIBDCache(!fInitialDownload); // Don't relay inventory during initial block download. if (fInitialDownload) return; diff --git a/src/protocol.cpp b/src/protocol.cpp index 694c13a7a88..0da160768d1 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -9,8 +9,6 @@ #include -static std::atomic g_initial_block_download_completed(false); - namespace NetMsgType { const char* VERSION = "version"; const char* VERACK = "verack"; @@ -125,12 +123,6 @@ bool CMessageHeader::IsCommandValid() const return true; } -void SetServiceFlagsIBDCache(bool state) { - g_initial_block_download_completed = state; -} - -bool GetServicesFlagsIBDCache() { return g_initial_block_download_completed; } - CInv::CInv() { type = 0; diff --git a/src/protocol.h b/src/protocol.h index e19560e33be..243cd23e6e6 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -318,10 +318,6 @@ std::vector serviceFlagsToStr(uint64_t flags); */ constexpr ServiceFlags SeedsServiceFlags() { return ServiceFlags(NODE_NETWORK | NODE_WITNESS); } -/** Set the current IBD status in order to figure out the desirable service flags */ -void SetServiceFlagsIBDCache(bool status); -bool GetServicesFlagsIBDCache(); - /** * Checks if a peer with the given service flags may be capable of having a * robust address-storage DB.