Skip to content

Commit 4e102d1

Browse files
committed
tapchannel: ensure the prev witness prev ID is set for 2nd level spends
Otherwise, we'll still be pointing to the wrong asset UTXO, even though the vIn was updated.
1 parent 13e7901 commit 4e102d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tapchannel/aux_sweeper.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,10 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
22152215
for _, vIn := range vPkt.Inputs {
22162216
vIn.PrevID.OutPoint = sweepSet.btcInput.OutPoint()
22172217
}
2218+
2219+
for _, vOut := range vPkt.Outputs {
2220+
vOut.Asset.PrevWitnesses[0].PrevID.OutPoint = sweepSet.btcInput.OutPoint()
2221+
}
22182222
}
22192223
}
22202224

0 commit comments

Comments
 (0)