Skip to content

Manually disabling a channel is overridden when restarting the node #5375

Open
@bjarnemagnussen

Description

@bjarnemagnussen

Background

After manually disabling a channel with lncli updatechanstatus TXID TXIDX --action disable, its state will be overridden as a automatically managed disabled channel (ChanStatusDisabled) on node restart.

After the channel is considered stable, it will then be automatically be enabled, hence completely overriding the state set manually prior to the restart.

The reason seems to be due to the function loadInitialChanState inside netann/chan_status_manager.go, which is not able to distinguish between if the last channel update was disabled automatically (ChanStatusDisabled) or manually (ChanStatusManuallyDisabled).

if lastUpdate.ChannelFlags&lnwire.ChanUpdateDisabled == 0 {
initialStatus = ChanStatusEnabled
} else {
initialStatus = ChanStatusDisabled
}

Your environment

  • version of lnd: 0.13.0-rc.5

Steps to reproduce

Manually disable a channel lncli updatechanstatus TXID TXIDX --action disable, restart the node, wait for the ChanEnableTimeout to pass, then the channel will be enabled.

Expected behaviour

I think it should stay manually disabled also after a node restart.

Actual behaviour

The channel is loaded as automatically disabled and then automatically enabled when the channel is stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3might get fixed, nice to havechannel managementThe management of the nodes channelsenhancementImprovements to existing features / behaviourgossip

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions