You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node: consolidate peer-store cleanup into ChannelClosed handler
Peer-store cleanup on channel closure was split across two places:
close_channel_internal removed the peer on a cooperative close, while the
ChannelClosed handler removed it for an allowlist of counterparty/on-chain
reasons. That allowlist missed terminal cases such as a channel closing
before funding (CounterpartyCoopClosedUnfundedChannel), leaving those
peers in the store and the reconnection loop retrying them indefinitely.
Make the ChannelClosed handler the single owner of the decision: retain
the peer only for HolderForceClosed -- where we deliberately keep
reconnecting so channel_reestablish can drive recovery, important against
LND peers that don't always handle force-closure error messages -- and
drop it for every other terminal reason once no other channel with the
peer remains. close_channel_internal no longer touches the peer store.
Add an integration test for the counterparty force-close path and keep
the retain/remove assertions in do_channel_full_cycle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments