Closed emergent-reasons closed 8 months ago
Regarding scale of impact, this made just one test file in the updated (using 0.9.1) anyhedge library test suite go from 120 seconds to 1.2 seconds.
Created #167 as a starting point for this.
tweaked the PR & merged to fix this issue!
Today I used patch-package to patch
cashscript@0.9.1
for the project I'm working on.I found that even when I set locktime to ensure that Transaction.build() does not make a network call to get latest blockheight, that it was still taking a long time. I dug in and found
setInputsAndOutputs()
is always fetching utxos from the network.The diff below is just for the build, and may have a better way, but I think something like it should work.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.