Open fanatid opened 8 years ago
We should add some benchmarks here and optimize.
@braydonf for what you want benchmark here?
Something similar to https://github.com/bitpay/bitcore-lib/blob/master/benchmark/serialization.js for a transaction with many inputs.
Do you know where the bottleneck is at?
Ah, sorry. Just realized that the solution was in the title. We should add benchmarks though.
Since getSignatures
and applySignatures
are already being called on each input, it could make sense to do something such as this:
transaction.inputs[1].sign(privateKey);
Although, if the time it takes is the problem, it may be better to fix that instead.
Add sign
for every input is good idea. It can be used in Transaction.sign
with specific input index/indices.
If you trying to sign transaction with a large number of inputs it's require a lot of time. bitcoinjs-lib has this possibility