Fixes #1193 so that during verification benchmarking it does not
unncessarily create thousands of CTransaction objects.
This commit is contained in:
@@ -193,6 +193,9 @@ double benchmark_large_tx()
|
|||||||
assert(ss.size() > MAX_BLOCK_SIZE - error);
|
assert(ss.size() > MAX_BLOCK_SIZE - error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Spending tx has all its inputs signed and does not need to be mutated anymore
|
||||||
|
CTransaction final_spending_tx(spending_tx);
|
||||||
|
|
||||||
// Benchmark signature verification costs:
|
// Benchmark signature verification costs:
|
||||||
timer_start();
|
timer_start();
|
||||||
for (size_t i = 0; i < NUM_INPUTS; i++) {
|
for (size_t i = 0; i < NUM_INPUTS; i++) {
|
||||||
@@ -200,7 +203,7 @@ double benchmark_large_tx()
|
|||||||
assert(VerifyScript(spending_tx.vin[i].scriptSig,
|
assert(VerifyScript(spending_tx.vin[i].scriptSig,
|
||||||
prevPubKey,
|
prevPubKey,
|
||||||
STANDARD_SCRIPT_VERIFY_FLAGS,
|
STANDARD_SCRIPT_VERIFY_FLAGS,
|
||||||
MutableTransactionSignatureChecker(&spending_tx, i),
|
TransactionSignatureChecker(&final_spending_tx, i),
|
||||||
&serror));
|
&serror));
|
||||||
}
|
}
|
||||||
return timer_stop();
|
return timer_stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user