Skip to content

Commit ab4297e

Browse files
committed
lnwallet/chancloser: use block height as lock time for rbf-coop
1 parent 540d3c0 commit ab4297e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lnwallet/chancloser/rbf_coop_states.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ type Environment struct {
294294
// ChanType is the type of channel we're attempting to close.
295295
ChanType channeldb.ChannelType
296296

297+
// BlockHeight is the current block height.
298+
BlockHeight uint32
299+
297300
// DefaultFeeRate is the fee we'll use for the closing transaction if
298301
// the user didn't specify an ideal fee rate. This may happen if the
299302
// remote party is the one that initiates the co-op close.

lnwallet/chancloser/rbf_coop_transitions.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,7 @@ func (l *LocalCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
716716
Msgs: []lnwire.Message{&lnwire.ClosingComplete{
717717
ChannelID: env.ChanID,
718718
FeeSatoshis: absoluteFee,
719-
// TODO(roasbeef): thread thru proper height
720-
// value
721-
LockTime: mempool.MaxRBFSequence,
719+
LockTime: env.BlockHeight,
722720
ClosingSigs: closingSigs,
723721
}},
724722
}}

0 commit comments

Comments
 (0)