Skip to content

Commit 9b91c16

Browse files
authored
Fix eclair-cli "compact" mode (#2990)
Fix eclair-cli "compact" output "compact" mode (-s option) needs to be updated after changes in how we manage short channel ids.
1 parent bc44808 commit 9b91c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-core/eclair-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jq_filter='if type=="object" and .error != null then .error else .';
155155

156156
# apply special jq filter if we are in "short" output mode -- only for specific commands such as 'channels'
157157
if [ "$short" = true ]; then
158-
jq_channel_filter="{ nodeId, shortChannelId: .data.shortIds.real.realScid, channelId, state, commitments: (.data.commitments.active | map({balanceSat: (try (.localCommit.spec.toLocal / 1000 | floor) catch null), capacitySat: .fundingTx.amountSatoshis, fundingTxIndex: .fundingTxIndex, channelPoint: .fundingTx.outPoint})) }";
158+
jq_channel_filter="{ nodeId, shortChannelId: .data.lastAnnouncement_opt.shortChannelId, channelId, state, commitments: (.data.commitments.active | map({balanceSat: (try (.localCommit.spec.toLocal / 1000 | floor) catch null), capacitySat: .fundingTx.amountSatoshis, fundingTxIndex: .fundingTxIndex, channelPoint: .fundingTx.outPoint})) }";
159159
case $api_endpoint in
160160
"channels") jq_filter="$jq_filter | map( $jq_channel_filter )" ;;
161161
"channel") jq_filter="$jq_filter | $jq_channel_filter" ;;

0 commit comments

Comments
 (0)