net: remove now unused global 'g_initial_block_download_completed'
This commit is contained in:
3 files changed
-13
No files matched your search
@@ -2086,7 +2086,6 @@ void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::sha
|
|||||||
void PeerManagerImpl::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
|
void PeerManagerImpl::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
|
||||||
{
|
{
|
||||||
SetBestBlock(pindexNew->nHeight, std::chrono::seconds{pindexNew->GetBlockTime()});
|
SetBestBlock(pindexNew->nHeight, std::chrono::seconds{pindexNew->GetBlockTime()});
|
||||||
SetServiceFlagsIBDCache(!fInitialDownload);
|
|
||||||
|
|
||||||
// Don't relay inventory during initial block download.
|
// Don't relay inventory during initial block download.
|
||||||
if (fInitialDownload) return;
|
if (fInitialDownload) return;
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
static std::atomic<bool> g_initial_block_download_completed(false);
|
|
||||||
|
|
||||||
namespace NetMsgType {
|
namespace NetMsgType {
|
||||||
const char* VERSION = "version";
|
const char* VERSION = "version";
|
||||||
const char* VERACK = "verack";
|
const char* VERACK = "verack";
|
||||||
@@ -125,12 +123,6 @@ bool CMessageHeader::IsCommandValid() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetServiceFlagsIBDCache(bool state) {
|
|
||||||
g_initial_block_download_completed = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetServicesFlagsIBDCache() { return g_initial_block_download_completed; }
|
|
||||||
|
|
||||||
CInv::CInv()
|
CInv::CInv()
|
||||||
{
|
{
|
||||||
type = 0;
|
type = 0;
|
||||||
|
|||||||
@@ -318,10 +318,6 @@ std::vector<std::string> serviceFlagsToStr(uint64_t flags);
|
|||||||
*/
|
*/
|
||||||
constexpr ServiceFlags SeedsServiceFlags() { return ServiceFlags(NODE_NETWORK | NODE_WITNESS); }
|
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
|
* Checks if a peer with the given service flags may be capable of having a
|
||||||
* robust address-storage DB.
|
* robust address-storage DB.
|
||||||
|
|||||||
Reference in new issue
Block a user