Merge pull request #275 from louisinger/fix-covenantless-round-tx-witnessutxo

fix: AddInWitnessUtxo in covenantless `txBuilder`
This commit is contained in:
João Bordalo
2024-08-23 11:54:05 +01:00
committed by GitHub

View File

@@ -624,7 +624,7 @@ func (b *txBuilder) createPoolTx(
if err != nil {
return nil, err
}
for _, utxo := range utxos {
for inIndex, utxo := range utxos {
script, err := hex.DecodeString(utxo.GetScript())
if err != nil {
return nil, err
@@ -633,7 +633,7 @@ func (b *txBuilder) createPoolTx(
if err := updater.AddInWitnessUtxo(&wire.TxOut{
Value: int64(utxo.GetValue()),
PkScript: script,
}, 0); err != nil {
}, inIndex); err != nil {
return nil, err
}
}