Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
chore: update LDK-node dependency to v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jun 24, 2024
1 parent 2c4f142 commit d6c1825
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/davrux/echo-logrus/v4 v4.0.3
github.com/elnosh/gonuts v0.1.1-0.20240602162005-49da741613e4
github.com/getAlby/glalby-go v0.0.0-20240616134525-322750d01f8d
github.com/getAlby/ldk-node-go v0.0.0-20240616134337-9740e8149bc0
github.com/getAlby/ldk-node-go v0.0.0-20240624050304-d2810786ce55
github.com/go-gormigrate/gormigrate/v2 v2.1.1
github.com/gorilla/sessions v1.2.2
github.com/labstack/echo-contrib v0.14.1
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,10 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/getAlby/glalby-go v0.0.0-20240416174357-e6e2faa2fbd8 h1:mJsdhUb8hmSSSLR2GQFw9BGtnJP7xmKB/XQxDt3DvAo=
github.com/getAlby/glalby-go v0.0.0-20240416174357-e6e2faa2fbd8/go.mod h1:ViyJvjlvv0GCesTJ7mb3fBo4G+/qsujDAFN90xZ7a9U=
github.com/getAlby/glalby-go v0.0.0-20240616134525-322750d01f8d h1:ouIUrgIJXgf+foCDfOU67oNSraBeED15vCoPvaanU1I=
github.com/getAlby/glalby-go v0.0.0-20240616134525-322750d01f8d/go.mod h1:ViyJvjlvv0GCesTJ7mb3fBo4G+/qsujDAFN90xZ7a9U=
github.com/getAlby/ldk-node-go v0.0.0-20240614062656-d4de573a1996 h1:UULF8HX3z0kxgppzDX67oG/7t1Es+tpZogqtsYsguX0=
github.com/getAlby/ldk-node-go v0.0.0-20240614062656-d4de573a1996/go.mod h1:8BRjtKcz8E0RyYTPEbMS8VIdgredcGSLne8vHDtcRLg=
github.com/getAlby/ldk-node-go v0.0.0-20240616134337-9740e8149bc0 h1:7BiZOIL+rAbR+waoXVYJCsMXIOTVBy/Ex4u2WoV4kTw=
github.com/getAlby/ldk-node-go v0.0.0-20240616134337-9740e8149bc0/go.mod h1:8BRjtKcz8E0RyYTPEbMS8VIdgredcGSLne8vHDtcRLg=
github.com/getAlby/ldk-node-go v0.0.0-20240624050304-d2810786ce55 h1:hDsk9Yn2FvxZ0fz/0+7Dv+Xdfha73krDuL8MhG70I6c=
github.com/getAlby/ldk-node-go v0.0.0-20240624050304-d2810786ce55/go.mod h1:8BRjtKcz8E0RyYTPEbMS8VIdgredcGSLne8vHDtcRLg=
github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down
9 changes: 7 additions & 2 deletions lnclient/ldk/ldk.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,13 @@ func (ls *LDKService) CloseChannel(ctx context.Context, closeChannelRequest *lnc
logger.Logger.WithFields(logrus.Fields{
"request": closeChannelRequest,
}).Info("Closing Channel")
// TODO: support passing force option
err := ls.node.CloseChannel(closeChannelRequest.ChannelId, closeChannelRequest.NodeId, closeChannelRequest.Force)

var err error
if closeChannelRequest.Force {
err = ls.node.ForceCloseChannel(closeChannelRequest.ChannelId, closeChannelRequest.NodeId)
} else {
err = ls.node.CloseChannel(closeChannelRequest.ChannelId, closeChannelRequest.NodeId)
}
if err != nil {
logger.Logger.WithError(err).Error("CloseChannel failed")
return nil, err
Expand Down

0 comments on commit d6c1825

Please sign in to comment.