mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
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.
This commit is contained in:
parent
e0fce065d5
commit
c2b8670099
2 changed files with 14 additions and 0 deletions
|
|
@ -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, () => {
|
||||
|
|
|
|||
|
|
@ -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**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue