Skip to content

Commit 339e828

Browse files
committed
staticaddr: high fee versions of the htlc tx
In this commit we add signings of higher fee htlc txns. The server requires the client to sign higher fee versions to cover for high fee environments where pending transactions take a long time to confirm.
1 parent 32503b4 commit 339e828

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

staticaddr/loopin/actions.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,18 @@ func (f *FSM) InitHtlcAction(_ fsm.EventContext) fsm.EventType {
146146
err = fmt.Errorf("unable to convert server nonces: %w", err)
147147
return f.HandleError(err)
148148
}
149+
f.htlcServerNoncesHighFee, err = toNonces(
150+
loopInResp.HtlcServerNoncesHighFee,
151+
)
152+
if err != nil {
153+
return f.HandleError(err)
154+
}
155+
f.htlcServerNoncesExtremelyHighFee, err = toNonces(
156+
loopInResp.HtlcServerNoncesExtremelyHighFee,
157+
)
158+
if err != nil {
159+
return f.HandleError(err)
160+
}
149161

150162
f.htlcServerNoncesHighFee, err = toNonces(
151163
loopInResp.HtlcServerNoncesHighFee,
@@ -186,6 +198,7 @@ func (f *FSM) InitHtlcAction(_ fsm.EventContext) fsm.EventType {
186198
if fee > maxFee {
187199
return f.HandleError(ErrFeeTooHigh)
188200
}
201+
f.loopIn.HtlcTxExtremelyHighFeeRate = extremelyHighFeeRate
189202

190203
// Derive the sweep address for the htlc timeout sweep tx.
191204
sweepAddress, err := f.cfg.WalletKit.NextAddr(

0 commit comments

Comments
 (0)