Skip to content

Commit

Permalink
cln: use proto files from cln v24.08
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Aug 30, 2024
1 parent 328c5a7 commit 3d788dc
Show file tree
Hide file tree
Showing 7 changed files with 40,416 additions and 14,050 deletions.
20 changes: 3 additions & 17 deletions cln/cln_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,7 @@ func (c *ClnClient) GetChannel(peerID []byte, channelPoint wire.OutPoint) (*ligh
}

for _, c := range channels.Channels {
if c.State == nil {
log.Printf("Channel '%+v' with peer '%x' doesn't have a state (yet).",
c.ShortChannelId, c.PeerId)
continue
}
state := int32(*c.State)
state := int32(c.State)
log.Printf("getChannel destination: %s, scid: %+v, local alias: %+v, "+
"FundingTxID:%x, State:%+v ", pubkey, c.ShortChannelId,
c.Alias.Local, c.FundingTxid, c.State)
Expand Down Expand Up @@ -267,12 +262,7 @@ func (c *ClnClient) GetClosedChannels(

lookup := make(map[string]uint64)
for _, c := range channels.Channels {
if c.State == nil {
log.Printf("Channel '%+v' with peer '%x' doesn't have a state (yet).",
c.ShortChannelId, c.PeerId)
continue
}
state := int32(*c.State)
state := int32(c.State)

if slices.Contains(CLOSING_STATUSES, state) {
if c.ShortChannelId == nil {
Expand Down Expand Up @@ -371,11 +361,7 @@ func (c *ClnClient) WaitChannelActive(peerID []byte, deadline time.Time) error {
)
if err == nil {
for _, c := range peer.Channels {
if c.State == nil {
continue
}

if slices.Contains(OPEN_STATUSES, int32(*c.State)) {
if slices.Contains(OPEN_STATUSES, int32(c.State)) {
return nil
}
}
Expand Down
Loading

0 comments on commit 3d788dc

Please sign in to comment.