diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-05-29 12:21:33 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-05-29 12:22:43 +0200 |
commit | de458da0c129b8468f4a779568f7f3ed5454c2d6 (patch) | |
tree | 436121489adc24400f518d159c36e3b0f6458035 | |
parent | 411e5f15478c8187b0a340fb5f38cb0270a4a320 (diff) | |
parent | fadbc5d89562df7e34379f9d01a757e30db7bbe2 (diff) |
Merge #16056: mempool: remove unused magic number from consistency check
fadbc5d89562df7e34379f9d01a757e30db7bbe2 mempool: remove unused magic number from consistency check (Gregory Sanders)
Pull request description:
Unexplained magic numbers are no good. Since the exact number does not matter, opt for a constant that is less peculiar.
Note that this could only possibly affect mempool consistency checks which is not active by default except on regtest.
see discussion: https://github.com/bitcoin/bitcoin/issues/15080
ACKs for commit fadbc5:
practicalswift:
utACK fadbc5d89562df7e34379f9d01a757e30db7bbe2
Tree-SHA512: 80f95ebc284c5bcc5d825fab0e9f962457a411539946d68ef4c8bdea4b1f2f7f0ead88928fac0eaaa02a1175f01f5ef381613ce53b0f27c3098e90d76ecfe9af
-rw-r--r-- | src/txmempool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 90b28227a0..80dbd9c19d 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -601,7 +601,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 |