paulmillr / scure-btc-signer

Audited & minimal library for creating, signing & decoding Bitcoin transactions.
https://paulmillr.com/noble/#scure
MIT License
135 stars 33 forks source link

Transaction.vsize is incorrect for non cloned transactions #18

Closed relayking closed 1 year ago

relayking commented 1 year ago

Noticed when making ordinals transactions, all input and outputs are taproot.

// setup taproot tx
...
clone = tx.clone()
tx.sign()
tx.finalize()
console.log(tx.vzise) // A
clone.sign()
clone.finalize()
console.log(clone.vzise) // B

B is correct and is greater than A.