Description
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
).
lnd/netann/chan_status_manager.go
Lines 664 to 668 in 42099ef
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.