From 6c2d88b3a57eff36c04329d8afde5350fd871037 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 11 Jan 2021 15:41:26 +0200 Subject: [PATCH] multi: bump lndclient to version with wait for unlock --- go.mod | 2 +- go.sum | 4 ++-- loopd/run.go | 6 +++--- test/router_mock.go | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5c69ef5..febad5d 100644 --- a/go.mod +++ b/go.mod @@ -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.11.1-beta github.com/lightningnetwork/lnd/cert v1.0.3 diff --git a/go.sum b/go.sum index 45d9fc1..5d2ceb0 100644 --- a/go.sum +++ b/go.sum @@ -178,8 +178,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= diff --git a/loopd/run.go b/loopd/run.go index 434e19d..1a33c06 100644 --- a/loopd/run.go +++ b/loopd/run.go @@ -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,7 @@ func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg { TLSPath: cfg.TLSPath, CheckVersion: LoopMinRequiredLndVersion, BlockUntilChainSynced: true, - ChainSyncCtx: syncCtx, + CallerCtx: callerCtx, } // If a custom lnd connection is specified we use that @@ -120,7 +120,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(): } }() diff --git a/test/router_mock.go b/test/router_mock.go index f7fbbaa..d094b8f 100644 --- a/test/router_mock.go +++ b/test/router_mock.go @@ -7,6 +7,7 @@ import ( ) type mockRouter struct { + lndclient.RouterClient lnd *LndMockServices }