diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-08-16 15:35:45 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-09-07 16:42:41 +0200 |
commit | b8c79a057c48c871a5e48bdcdf600fbfe68f656b (patch) | |
tree | 952520d17bc5e231361bab33489175497ecd4a52 /src/txmempool.cpp | |
parent | a9874310c0f67c80a1f04854c5c9ed154e1bbf97 (diff) | |
download | bitcoin-b8c79a057c48c871a5e48bdcdf600fbfe68f656b.tar.xz |
Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 82827b8e4f..8b974d7312 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -737,7 +737,8 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const waitingOnDependants.push_back(&(*it)); else { CValidationState state; - assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, NULL)); + PrecomputedTransactionData txdata(tx); + assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, txdata, NULL)); UpdateCoins(tx, mempoolDuplicate, 1000000); } } @@ -751,7 +752,8 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const stepsSinceLastRemove++; assert(stepsSinceLastRemove < waitingOnDependants.size()); } else { - assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, NULL)); + PrecomputedTransactionData txdata(entry->GetTx()); + assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, txdata, NULL)); UpdateCoins(entry->GetTx(), mempoolDuplicate, 1000000); stepsSinceLastRemove = 0; } |