From c2b8670099c288f3d3862d0c7e46b93e21b57a29 Mon Sep 17 00:00:00 2001 From: saubyk <39208279+saubyk@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:21:33 -0700 Subject: [PATCH] Rebuild compiled cln/channels.js to match its source (#1606) The #1606 fix added 'channel.connected = !!channel.peer_connected' to server/controllers/cln/channels.ts but the committed compiled artifact backend/controllers/cln/channels.js was never regenerated, leaving it stale. Rebuild it so the committed backend output matches its TypeScript source. --- backend/controllers/cln/channels.js | 5 +++++ release-notes/Release-notes-0.15.9.md | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/backend/controllers/cln/channels.js b/backend/controllers/cln/channels.js index f9b31ba3..fb7a00e3 100644 --- a/backend/controllers/cln/channels.js +++ b/backend/controllers/cln/channels.js @@ -21,6 +21,11 @@ export const listPeerChannels = (req, res, next) => { const getPeerAliasesTasks = body.channels.map((channel) => () => { channel.to_them_msat = channel.total_msat - channel.to_us_msat; channel.balancedness = (channel.total_msat === 0) ? 1 : (1 - Math.abs((channel.to_us_msat - channel.to_them_msat) / channel.total_msat)).toFixed(3); + // listpeerchannels reports connection state as peer_connected. Mirror it onto the + // documented legacy 'connected' field (see the Channel model) as a real boolean, so + // any backward-compat consumer of this endpoint gets a defined true/false rather than + // undefined when peer_connected is absent (issue #1606). + channel.connected = !!channel.peer_connected; return getAlias(req.session.selectedNode, channel, 'peer_id'); }); common.runWithConcurrencyLimit(getPeerAliasesTasks, 20, () => { diff --git a/release-notes/Release-notes-0.15.9.md b/release-notes/Release-notes-0.15.9.md index 87157c9b..3cb451e6 100644 --- a/release-notes/Release-notes-0.15.9.md +++ b/release-notes/Release-notes-0.15.9.md @@ -105,6 +105,15 @@ this release should add its entry under the appropriate section below. mobile (SM) layouts, so it's surfaced on the list out of the box. Users who have already customized this page keep their saved columns and can add it via the column-settings gear. +## Code Health + +- **Rebuild the compiled CLN channels controller to match its source** + ([#1631](https://github.com/Ride-The-Lightning/RTL/pull/1631)). + The #1606 fix updated `server/controllers/cln/channels.ts` to mirror `peer_connected` onto the + legacy `connected` field, but the committed compiled artifact + `backend/controllers/cln/channels.js` was never regenerated, so it lagged its source. Rebuilt it + so the committed backend output includes the connected-mirror line. + ## Developer Tooling - **Rebuilt the regtest docker fixture**