diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-02-17 21:28:50 +1100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-02-17 21:28:50 +1100 |
commit | eb9183535d5fc2dfe8c0e26378f2621d3473c303 (patch) | |
tree | 70b48dc82edef8dd5d44424e46143fff8e0581c5 /src/protocol.h | |
parent | 3f56df5b7564878330ddddddec8afa923a4f8390 (diff) |
Add setter for g_initial_block_download_completed
Diffstat (limited to 'src/protocol.h')
-rw-r--r-- | src/protocol.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/protocol.h b/src/protocol.h index 4907c38e5c..e518d11944 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -278,7 +278,6 @@ enum ServiceFlags : uint64_t { // BIP process. }; -extern std::atomic<bool> g_initial_block_download_completed; /** * Gets the set of service flags which are "desirable" for a given peer. * @@ -303,12 +302,10 @@ extern std::atomic<bool> g_initial_block_download_completed; * If the NODE_NONE return value is changed, contrib/seeds/makeseeds.py * should be updated appropriately to filter for the same nodes. */ -static ServiceFlags GetDesirableServiceFlags(ServiceFlags services) { - if ((services & NODE_NETWORK_LIMITED) && g_initial_block_download_completed) { - return ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS); - } - return ServiceFlags(NODE_NETWORK | NODE_WITNESS); -} +ServiceFlags GetDesirableServiceFlags(ServiceFlags services); + +/** Set the current IBD status in order to figure out the desirable service flags */ +void SetServiceFlagsIBDCache(bool status); /** * A shortcut for (services & GetDesirableServiceFlags(services)) |