Closed holzeis closed 1 year ago
I'm taking over this last bit :)
@klochowicz / @luckysori / @da-kami : please have another look at my fixup: 477e8e2
(#496). I don't think the logic is needed:
is_first_channel_usable=false
, try to reconnectis_first_channel_usable=true
: we are connected, no need to reconnectis_first_channel_usable=false
: we are not conncted, reconnectis_first_channel_usable
uses is_usable: channel.is_live(),
which checks if channel_state=ChannelState::PeerDisconnected
. So no need to have another check
Rebased and going ahead to merge this.
bors r+
Build succeeded:
Before that PR we where only depending on a timeout and a lightning balance. However, this led to several error messages as a lightning balance does not mean the channel is usable.
The PR introduces a sync of the channel state every 5 seconds representing the following 3 states:
ebe4fb219a61b1802e673723916a77b8bad79ad4 fixes a regression after merging https://github.com/itchysats/10101/pull/483: we can not assume there is always a channel available. The taker was trying to reconnect constantly if no channel was available or if it was in creation. It's hard to distinguish between a good and a bad usable channel (as it might be in creation) - I am using the
short_channel_id
now to distinguish if the channel is actually in a bad state or everything is fine.