From ab4297e1272492a2b399e2908ac47406817296c6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 21 Nov 2024 20:05:12 -0800 Subject: [PATCH] lnwallet/chancloser: use block height as lock time for rbf-coop --- lnwallet/chancloser/rbf_coop_states.go | 3 +++ lnwallet/chancloser/rbf_coop_transitions.go | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lnwallet/chancloser/rbf_coop_states.go b/lnwallet/chancloser/rbf_coop_states.go index 613e7c690..40f738ab3 100644 --- a/lnwallet/chancloser/rbf_coop_states.go +++ b/lnwallet/chancloser/rbf_coop_states.go @@ -294,6 +294,9 @@ type Environment struct { // ChanType is the type of channel we're attempting to close. ChanType channeldb.ChannelType + // BlockHeight is the current block height. + BlockHeight uint32 + // DefaultFeeRate is the fee we'll use for the closing transaction if // the user didn't specify an ideal fee rate. This may happen if the // remote party is the one that initiates the co-op close. diff --git a/lnwallet/chancloser/rbf_coop_transitions.go b/lnwallet/chancloser/rbf_coop_transitions.go index de7a09dd9..0b57463c4 100644 --- a/lnwallet/chancloser/rbf_coop_transitions.go +++ b/lnwallet/chancloser/rbf_coop_transitions.go @@ -716,9 +716,7 @@ func (l *LocalCloseStart) ProcessEvent(event ProtocolEvent, env *Environment, Msgs: []lnwire.Message{&lnwire.ClosingComplete{ ChannelID: env.ChanID, FeeSatoshis: absoluteFee, - // TODO(roasbeef): thread thru proper height - // value - LockTime: mempool.MaxRBFSequence, + LockTime: env.BlockHeight, ClosingSigs: closingSigs, }}, }}