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

@@ -1090,4 +1090,16 @@ void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors,
}
}
bool CTxMemPool::IsLoaded() const
{
LOCK(cs);
return m_is_loaded;
}
void CTxMemPool::SetIsLoaded(bool loaded)
{
LOCK(cs);
m_is_loaded = loaded;
}
SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand(std::numeric_limits<uint64_t>::max())), k1(GetRand(std::numeric_limits<uint64_t>::max())) {}