Skip to content

Commit

Permalink
multi: added short channel id for PeerSwapPeerChannel
Browse files Browse the repository at this point in the history
A short channel id is more intuitive and "human readable".
Added short channel id for rpc, and set the value both short channel id and channel id for cln.
  • Loading branch information
YusukeShimizu committed Dec 10, 2024
1 parent 82b7b66 commit 3df5a8a
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 135 deletions.
9 changes: 5 additions & 4 deletions clightning/clightning_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,11 @@ func (l *ListPeers) Call() (jrpc2.Result, error) {
return nil, err
}
peerSwapPeerChannels = append(peerSwapPeerChannels, &peerswaprpc.PeerSwapPeerChannel{
ChannelId: scid.ToUint64(),
LocalBalance: c.OurAmountMilliSatoshi.MSat() / 1000,
RemoteBalance: (c.AmountMilliSatoshi.MSat() - c.OurAmountMilliSatoshi.MSat()) / 1000,
Active: channelActive(c.State),
ChannelId: scid.ToUint64(),
ShortChannelId: c.ShortChannelId,
LocalBalance: c.OurAmountMilliSatoshi.MSat() / 1000,
RemoteBalance: (c.AmountMilliSatoshi.MSat() - c.OurAmountMilliSatoshi.MSat()) / 1000,
Active: channelActive(c.State),
})
}
}
Expand Down
Loading

0 comments on commit 3df5a8a

Please sign in to comment.