diff options
| author | Jorge Timón <[email protected]> | 2016-07-16 20:57:42 +0200 |
|---|---|---|
| committer | Jorge Timón <[email protected]> | 2016-07-29 00:48:20 +0200 |
| commit | a6cc299541fc9df5af010ce63eb1dd34d8c4b6e2 (patch) | |
| tree | f52ef4c884de78f70d3bd008dfd5fb58521870f0 /src/txmempool.cpp | |
| parent | Merge #8317: [rpcwallet] Don't use floating point (diff) | |
| download | discoin-a6cc299541fc9df5af010ce63eb1dd34d8c4b6e2.tar.xz discoin-a6cc299541fc9df5af010ce63eb1dd34d8c4b6e2.zip | |
Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
Diffstat (limited to 'src/txmempool.cpp')
| -rw-r--r-- | src/txmempool.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index a48a6d946..b30022bd6 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -657,6 +657,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const uint64_t innerUsage = 0; CCoinsViewCache mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins)); + const int64_t nSpendHeight = GetSpendHeight(mempoolDuplicate); LOCK(cs); list<const CTxMemPoolEntry*> waitingOnDependants; @@ -737,7 +738,9 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const waitingOnDependants.push_back(&(*it)); else { CValidationState state; - assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, NULL)); + bool fCheckResult = tx.IsCoinBase() || + Consensus::CheckTxInputs(tx, state, mempoolDuplicate, nSpendHeight); + assert(fCheckResult); UpdateCoins(tx, mempoolDuplicate, 1000000); } } @@ -751,7 +754,9 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const stepsSinceLastRemove++; assert(stepsSinceLastRemove < waitingOnDependants.size()); } else { - assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, NULL)); + bool fCheckResult = entry->GetTx().IsCoinBase() || + Consensus::CheckTxInputs(entry->GetTx(), state, mempoolDuplicate, nSpendHeight); + assert(fCheckResult); UpdateCoins(entry->GetTx(), mempoolDuplicate, 1000000); stepsSinceLastRemove = 0; } |