lnwallet: use custom LockTime for rbf coop close

This commit is contained in:
Olaoluwa Osuntokun
2024-09-24 16:46:28 +09:00
parent ab4297e127
commit b94ce6fa08
3 changed files with 39 additions and 4 deletions

View File

@@ -547,8 +547,8 @@ func (r *rbfCloserTestHarness) expectHalfSignerIteration(
}
case *SendOfferEvent:
expectedStates = []RbfState{&ClosingNegotiation{}}
expectedStates = []RbfState{&ClosingNegotiation{}}
case *ChannelFlushed:
// If we're sending a flush event here, then this means that we
// also have enough balance to cover the fee so we'll have
@@ -1534,7 +1534,7 @@ func TestRbfCloseClosingNegotiationRemote(t *testing.T) {
feeOffer := &OfferReceivedEvent{
SigMsg: lnwire.ClosingComplete{
FeeSatoshis: absoluteFee,
LockTime: 10,
LockTime: 1,
ClosingSigs: lnwire.ClosingSigs{
CloserAndClosee: newSigTlv[tlv.TlvType3]( //nolint:ll
remoteWireSig,

View File

@@ -902,6 +902,7 @@ func (l *RemoteCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
chanOpts := []lnwallet.ChanCloseOpt{
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
lnwallet.WithCustomLockTime(msg.SigMsg.LockTime),
}
chancloserLog.Infof("responding to close w/ local_addr=%x, "+