@@ -1042,7 +1042,7 @@ func (b *batch) publishBatchCoop(ctx context.Context) (btcutil.Amount,
10421042
10431043 // Attempt to cooperatively sign the batch tx with the server.
10441044 err = b .coopSignBatchTx (
1045- ctx , packet , sweeps , prevOuts , psbtBuf .Bytes (),
1045+ ctx , batchTx , sweeps , prevOuts , psbtBuf .Bytes (),
10461046 )
10471047 if err != nil {
10481048 return fee , err , false
@@ -1084,21 +1084,21 @@ func (b *batch) debugLogTx(msg string, tx *wire.MsgTx) {
10841084
10851085// coopSignBatchTx collects the necessary signatures from the server in order
10861086// to cooperatively sweep the funds.
1087- func (b * batch ) coopSignBatchTx (ctx context.Context , packet * psbt. Packet ,
1087+ func (b * batch ) coopSignBatchTx (ctx context.Context , tx * wire. MsgTx ,
10881088 sweeps []sweep , prevOuts map [wire.OutPoint ]* wire.TxOut ,
10891089 psbt []byte ) error {
10901090
10911091 for i , sweep := range sweeps {
10921092 sweep := sweep
10931093
10941094 finalSig , err := b .musig2sign (
1095- ctx , i , sweep , packet . UnsignedTx , prevOuts , psbt ,
1095+ ctx , i , sweep , tx , prevOuts , psbt ,
10961096 )
10971097 if err != nil {
10981098 return err
10991099 }
11001100
1101- packet . UnsignedTx .TxIn [i ].Witness = wire.TxWitness {
1101+ tx .TxIn [i ].Witness = wire.TxWitness {
11021102 finalSig ,
11031103 }
11041104 }
0 commit comments