Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/btcsuite/btcd v0.24.3-0.20250318170759-4f4ea81776d6
github.com/btcsuite/btcd/btcutil v1.1.6
github.com/elnosh/gonuts v0.4.2
github.com/getAlby/ldk-node-go v0.0.0-20250819102405-2b4fad579464
github.com/getAlby/ldk-node-go v0.0.0-20250821075222-c472ce40ecbf
github.com/go-gormigrate/gormigrate/v2 v2.1.4
github.com/labstack/echo/v4 v4.13.4
github.com/mattn/go-sqlite3 v1.14.32
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/getAlby/ldk-node-go v0.0.0-20250819102405-2b4fad579464 h1:5MfsQgTwuWfPfslnG5XwcTEjTMF9ADx9RLVemvNhwF4=
github.com/getAlby/ldk-node-go v0.0.0-20250819102405-2b4fad579464/go.mod h1:8BRjtKcz8E0RyYTPEbMS8VIdgredcGSLne8vHDtcRLg=
github.com/getAlby/ldk-node-go v0.0.0-20250821075222-c472ce40ecbf h1:y0rcguUHZGDiori3a/tJe7OO6n1h98hqMUIzA94/lvk=
github.com/getAlby/ldk-node-go v0.0.0-20250821075222-c472ce40ecbf/go.mod h1:8BRjtKcz8E0RyYTPEbMS8VIdgredcGSLne8vHDtcRLg=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gormigrate/gormigrate/v2 v2.1.4 h1:KOPEt27qy1cNzHfMZbp9YTmEuzkY4F4wrdsJW9WFk1U=
github.com/go-gormigrate/gormigrate/v2 v2.1.4/go.mod h1:y/6gPAH6QGAgP1UfHMiXcqGeJ88/GRQbfCReE1JJD5Y=
Expand Down
9 changes: 7 additions & 2 deletions lnclient/ldk/ldk.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,14 @@ func (ls *LDKService) Shutdown() error {
logger.Logger.Info("cancelling LDK context")
ls.cancel()

for ls.syncing {
logger.Logger.Warn("Waiting for background sync to finish before stopping LDK node...")
maxAttempts := 40
for i := 0; ls.syncing; i++ {
logger.Logger.WithField("attempt", i).Warn("Waiting for background sync to finish before stopping LDK node...")
time.Sleep(1 * time.Second)
if i > maxAttempts {
logger.Logger.Error("Timed out waiting for background sync to finish before stopping LDK node")
break
}
}

logger.Logger.Info("stopping LDK node")
Expand Down