mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
This commit is contained in:
parent
a9874310c0
commit
b8c79a057c
9 changed files with 163 additions and 40 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue