Skip to content

fix(channeld): handle NULL short_channel_id in AWAITING_LOCKIN state #8435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kwsantiago
Copy link

@kwsantiago kwsantiago commented Aug 2, 2025

Fixes #7222 crash when reconnecting channels in CHANNELD_AWAITING_LOCKIN state without short_channel_id.

The issue occurred when channels stuck in AWAITING_LOCKIN state (with missing funding tx) attempted to reconnect. The code passed a zero-initialized scid struct to towire_channeld_init, causing a crash when accessing short_channel_id.u64.

Changes:

  • Modified peer_start_channeld to use pointer for scid instead of struct
  • Updated channeld wire protocol to handle optional short_channel_id
  • Added defensive check in connect_activate_subd for NULL scid
  • channeld now falls back to local_alias when has_funding_short_id is false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash when channeld does not have short_channel_id
1 participant