bench: sighash benchmarks.

This commit is contained in:
Christopher Jeffrey 2017-07-05 19:11:54 -07:00
parent ca81520875
commit ec475d6d1c
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -96,6 +96,12 @@ for (i = 0; i < 3000; i++)
tx3.tx.verify(tx3.view, Script.flags.VERIFY_P2SH);
end(i * tx3.tx.inputs.length);
end = bench('verify2');
let script = tx3.view.getOutputFor(tx3.tx.inputs[0]).script;
for (i = 0; i < 100000; i++)
tx3.tx.signatureHashV0(0, script, Script.hashType.ALL);
end(i);
end = bench('fee');
for (i = 0; i < 1000; i++)
tx3.tx.getFee(tx3.view);