Skip to content

Commit 5b5dfc0

Browse files
authored
Merge pull request #506 from bhandras/sweeper-htlcv3
sweep: fill sign method when script spending a taproot htlc
2 parents 8f23c67 + c9bc10e commit 5b5dfc0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sweep/sweeper.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ func (s *Sweeper) CreateSweepTx(
7171
},
7272
}
7373

74+
// Update the sign method from the default witness_v0 if this is a
75+
// taproot htlc. Note that we'll always be doing script spend when
76+
// sweeping a taproot htlc using the CreateSweepTx function.
77+
if htlc.Version == swap.HtlcV3 {
78+
signDesc.SignMethod = input.TaprootScriptSpendSignMethod
79+
}
80+
7481
// We need our previous outputs for taproot spends, and there's no
7582
// harm including them for segwit v0, so we always include our prevOut.
7683
prevOut := []*wire.TxOut{

0 commit comments

Comments
 (0)