diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 6b10a175e..e5a4c5d62 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1135,19 +1135,19 @@ func (l *channelLink) updateChannelFee(feePerKw btcutil.Amount) error { log.Infof("ChannelPoint(%v): updating commit fee to %v sat/kw", l, feePerKw) + // We skip sending the UpdateFee message if the channel is not + // currently eligable to forward messages. + if !l.EligibleToForward() { + log.Debugf("ChannelPoint(%v): skipping fee update for " + + "inactive channel") + return nil + } + // First, we'll update the local fee on our commitment. if err := l.channel.UpdateFee(feePerKw); err != nil { return err } - // We skip sending the update_fee message if the channel is not currently - // eligable to forward messages - if !l.EligibleToForward() { - log.Infof("ChannelPoint(%v): skipping transmission of update_fee. " + - "channel is not eligable for forwarding messages") - return nil - } - // We'll then attempt to send a new UpdateFee message, and also lock it // in immediately by triggering a commitment update. msg := lnwire.NewUpdateFee(l.ChanID(), uint32(feePerKw))