diff options
author | John Newbery <john@johnnewbery.com> | 2019-10-24 11:35:42 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-10-29 15:46:45 -0400 |
commit | a27a2957ed9afbe5a96caa5f0f4cbec730d27460 (patch) | |
tree | e83a88e5984432ac8ac8b54b623f4c0ee88fc3b4 /src/txmempool.cpp | |
parent | 48cb468ce3f52195dfc64c6df88b8af36b77dbb0 (diff) | |
download | bitcoin-a27a2957ed9afbe5a96caa5f0f4cbec730d27460.tar.xz |
[validation] Add CValidationState subclasses
Split CValidationState into TxValidationState and BlockValidationState
to store validation results for transactions and blocks respectively.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index e4c1fd4bc6..64d270f4c6 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -591,9 +591,9 @@ void CTxMemPool::clear() static void CheckInputsAndUpdateCoins(const CTransaction& tx, CCoinsViewCache& mempoolDuplicate, const int64_t spendheight) { - CValidationState state; + TxValidationState dummy_state; // Not used. CheckTxInputs() should always pass CAmount txfee = 0; - bool fCheckResult = tx.IsCoinBase() || Consensus::CheckTxInputs(tx, state, mempoolDuplicate, spendheight, txfee); + bool fCheckResult = tx.IsCoinBase() || Consensus::CheckTxInputs(tx, dummy_state, mempoolDuplicate, spendheight, txfee); assert(fCheckResult); UpdateCoins(tx, mempoolDuplicate, std::numeric_limits<int>::max()); } |