Move g_is_mempool_loaded into CTxMemPool::m_is_loaded

So the loaded state is explicitly mempool-specific.
This commit is contained in:
Ben Woosley
2019-03-07 09:54:44 -05:00
parent bb8ae2c419
commit effe81f750
6 changed files with 38 additions and 20 deletions

View File

@@ -149,7 +149,6 @@ extern CScript COINBASE_FLAGS;
extern CCriticalSection cs_main;
extern CBlockPolicyEstimator feeEstimator;
extern CTxMemPool mempool;
extern std::atomic_bool g_is_mempool_loaded;
typedef std::unordered_map<uint256, CBlockIndex*, BlockHasher> BlockMap;
extern BlockMap& mapBlockIndex GUARDED_BY(cs_main);
extern const std::string strMessageMagic;
@@ -486,10 +485,10 @@ static const unsigned int REJECT_HIGHFEE = 0x100;
CBlockFileInfo* GetBlockFileInfo(size_t n);
/** Dump the mempool to disk. */
bool DumpMempool();
bool DumpMempool(const CTxMemPool& pool);
/** Load the mempool from disk. */
bool LoadMempool();
bool LoadMempool(CTxMemPool& pool);
//! Check whether the block associated with this index entry is pruned or not.
inline bool IsBlockPruned(const CBlockIndex* pblockindex)