Closed serious-sammy closed 1 year ago
Yes @serious-sammy that is correct. Descriptors are designed to be "per utxo", not using ranges. The whole API is around this concept.
Anyway, creating objects itself shouldn't pose a problem. Can you maybe benchmark and see which specific function calls are creating the bottleneck?
Hello again! Another question:
Is it intended behavior that for every address index a new Descriptor object has to be instantiated with a new
index
option? Is there no way to increment an index of an already existing Descriptor instantiated from a ranged expression?When creating a large amount of addresses (e.g. 2000+) it would likely yield much better performance to do something like
.getAddress(index)
on an existing instance. For example, in my current tx building implementation,new Descriptor()
takes around 40% of the whole execution time - which is a noticeable hog when a large number of transactions, with multiple inputs each, needs to be generated, especially on lower-end devices.Thanks again for this very useful library!