Skip to content

rebalance: handle channels without short_channel_id#888

Open
bittylicious wants to merge 1 commit into
lightningd:masterfrom
bittylicious:fix-rebalance-missing-short-channel-id
Open

rebalance: handle channels without short_channel_id#888
bittylicious wants to merge 1 commit into
lightningd:masterfrom
bittylicious:fix-rebalance-missing-short-channel-id

Conversation

@bittylicious

@bittylicious bittylicious commented Jun 28, 2026

Copy link
Copy Markdown

The rebalance plugin can crash in peer_from_scid when listpeerchannels returns entries without a short_channel_id, such as channels that are not yet announced/locked in.

This changes the lookup to use ch.get("short_channel_id") before comparing, matching the defensive pattern already used elsewhere in the plugin.

Observed against Core Lightning v26.06 while running an explicit rebalance; the RPC failed with KeyError: 'short_channel_id'.

Validation:\n- python3 -m py_compile rebalance/rebalance.py rebalance/test_rebalance.py

  • Applied equivalent one-line fix on a running node and confirmed explicit rebalance commands complete successfully.

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.

1 participant