diff --git a/lnwallet/chancloser/chancloser.go b/lnwallet/chancloser/chancloser.go index b88f2b97e..b47308006 100644 --- a/lnwallet/chancloser/chancloser.go +++ b/lnwallet/chancloser/chancloser.go @@ -345,16 +345,6 @@ func (c *ChanCloser) initChanShutdown() (*lnwire.Shutdown, error) { c.chanPoint, err) } - // Before continuing, mark the channel as cooperatively closed with a - // nil txn. Even though we haven't negotiated the final txn, this - // guarantees that our listchannels rpc will be externally consistent, - // and reflect that the channel is being shutdown by the time the - // closing request returns. - err := c.cfg.Channel.MarkCoopBroadcasted(nil, c.locallyInitiated) - if err != nil { - return nil, err - } - chancloserLog.Infof("ChannelPoint(%v): sending shutdown message", c.chanPoint) @@ -627,6 +617,18 @@ func (c *ChanCloser) BeginNegotiation() ( // compute what our max/ideal fee will be. c.initFeeBaseline() + // Before continuing, mark the channel as cooperatively closed + // with a nil txn. Even though we haven't negotiated the final + // txn, this guarantees that our listchannels rpc will be + // externally consistent, and reflect that the channel is being + // shutdown by the time the closing request returns. + err := c.cfg.Channel.MarkCoopBroadcasted( + nil, c.locallyInitiated, + ) + if err != nil { + return noClosingSigned, err + } + // At this point, we can now start the fee negotiation state, by // constructing and sending our initial signature for what we // think the closing transaction should look like.