You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
At the moment, the estimateTxSize function expects a simple numInputs arg becuase it assumes all inputs are of type p2wpkh | p2sh(p2wpkh), therefore the estimation for txs that include other types of inputs may not be accurate.
This can be fixed by expecting a list of input script types + 2 lists of auxiliary redeeem script sizes and witness sizes instead of the numInputs one. The auxiliary arrays can be easily reconstructed from a pset in wallet.buildTx, or properly crafted from wallet info in wallet.sendTx
At the moment, the
estimateTxSize
function expects a simplenumInputs
arg becuase it assumes all inputs are of typep2wpkh | p2sh(p2wpkh)
, therefore the estimation for txs that include other types of inputs may not be accurate.This can be fixed by expecting a list of input script types + 2 lists of auxiliary redeeem script sizes and witness sizes instead of the
numInputs
one. The auxiliary arrays can be easily reconstructed from a pset inwallet.buildTx
, or properly crafted from wallet info inwallet.sendTx
Take a look here for a reference implementation.
The text was updated successfully, but these errors were encountered: