Merge pull request #327 from carlaKC/325-waitunlocked

loopd: wait for lnd to be unlocked on startup
pull/334/head
Carla Kirk-Cohen 3 years ago committed by GitHub
commit d85cc010b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,7 +10,7 @@ require (
github.com/golang/protobuf v1.3.2
github.com/grpc-ecosystem/grpc-gateway v1.14.3
github.com/jessevdk/go-flags v1.4.0
github.com/lightninglabs/lndclient v0.11.0-3
github.com/lightninglabs/lndclient v0.11.0-5
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d
github.com/lightningnetwork/lnd v0.12.0-beta.rc3
github.com/lightningnetwork/lnd/cert v1.0.3

@ -182,8 +182,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
github.com/lightninglabs/lndclient v0.11.0-3 h1:x8co3UOeaUwh0iBFNeaPaqJsg8gvlgV/+fQHp2MT9eI=
github.com/lightninglabs/lndclient v0.11.0-3/go.mod h1:8/cTKNwgL87NX123gmlv3Xh6p1a7pvzu+40Un3PhHiI=
github.com/lightninglabs/lndclient v0.11.0-5 h1:nHDit/3siG8wvzbQPiyGVpu9v5llqThJK1KmG/IZTIw=
github.com/lightninglabs/lndclient v0.11.0-5/go.mod h1:nIQ+lDm7JGRmP7OSeVfhOAyoqD4GA4NYU8GTsTXITbE=
github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg=
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200 h1:j4iZ1XlUAPQmW6oSzMcJGILYsRHNs+4O3Gk+2Ms5Dww=
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200/go.mod h1:MlZmoKa7CJP3eR1s5yB7Rm5aSyadpKkxqAwLQmog7N0=

@ -82,7 +82,7 @@ func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg {
getLnd: func(network lndclient.Network, cfg *lndConfig) (
*lndclient.GrpcLndServices, error) {
syncCtx, cancel := context.WithCancel(
callerCtx, cancel := context.WithCancel(
context.Background(),
)
defer cancel()
@ -94,7 +94,8 @@ func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg {
TLSPath: cfg.TLSPath,
CheckVersion: LoopMinRequiredLndVersion,
BlockUntilChainSynced: true,
ChainSyncCtx: syncCtx,
CallerCtx: callerCtx,
BlockUntilUnlocked: true,
}
// If a custom lnd connection is specified we use that
@ -120,7 +121,7 @@ func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg {
// If our sync context was cancelled, we know
// that the function exited, which means that
// our client synced.
case <-syncCtx.Done():
case <-callerCtx.Done():
}
}()

@ -16,6 +16,8 @@ This file tracks release notes for the loop client.
- Fixed compile time compatibility with `lnd v0.12.0-beta`.
#### New Features
* If lnd is locked when the loop client starts up, it will wait for lnd to be
unlocked. Previous versions would exit with an error.
#### Breaking Changes

@ -7,6 +7,7 @@ import (
)
type mockRouter struct {
lndclient.RouterClient
lnd *LndMockServices
}

Loading…
Cancel
Save