libitx / txforge

Modern Bitcoin transaction builder, capable of supporting any non-standard and custom script type.
Apache License 2.0
63 stars 21 forks source link

Error in build logic missing changeScript in some instances #14

Closed libitx closed 3 years ago

libitx commented 3 years ago

In some cases the changeScript is not built despite it being set.

Issue appears to be here as length is undefined on a Script instance. Need to measure length of the binary script.

https://github.com/libitx/txforge/blob/cdf75db952b9493158a05ca4447791f9e5af8107/src/forge.js#L265

Dont understand why this works some times but not others. Should fail all the time. Needs more digging.