diff options
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 68f47d5cce..cac7beb6a1 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -11,9 +11,8 @@ #include <validation.h> #include <policy/policy.h> #include <policy/fees.h> +#include <policy/settings.h> #include <reverse_iterator.h> -#include <streams.h> -#include <timedata.h> #include <util/system.h> #include <util/moneystr.h> #include <util/time.h> @@ -600,7 +599,7 @@ static void CheckInputsAndUpdateCoins(const CTransaction& tx, CCoinsViewCache& m CAmount txfee = 0; bool fCheckResult = tx.IsCoinBase() || Consensus::CheckTxInputs(tx, state, mempoolDuplicate, spendheight, txfee); assert(fCheckResult); - UpdateCoins(tx, mempoolDuplicate, 1000000); + UpdateCoins(tx, mempoolDuplicate, std::numeric_limits<int>::max()); } void CTxMemPool::check(const CCoinsViewCache *pcoins) const @@ -764,7 +763,7 @@ std::vector<CTxMemPool::indexed_transaction_set::const_iterator> CTxMemPool::Get return iters; } -void CTxMemPool::queryHashes(std::vector<uint256>& vtxid) +void CTxMemPool::queryHashes(std::vector<uint256>& vtxid) const { LOCK(cs); auto iters = GetSortedDepthAndScore(); @@ -1090,4 +1089,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())) {} |