mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: check lnd version and subservers
This commit is contained in:
parent
3da09aac0e
commit
ad4e1e971e
1 changed files with 20 additions and 4 deletions
|
|
@ -12,10 +12,25 @@ import (
|
|||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/verrpc"
|
||||
)
|
||||
|
||||
const defaultConfigFilename = "loopd.conf"
|
||||
|
||||
var (
|
||||
// LoopMinRequiredLndVersion is the minimum required version of lnd that
|
||||
// is compatible with the current version of the loop client. Also all
|
||||
// listed build tags/subservers need to be enabled.
|
||||
LoopMinRequiredLndVersion = &verrpc.Version{
|
||||
AppMajor: 0,
|
||||
AppMinor: 10,
|
||||
AppPatch: 0,
|
||||
BuildTags: []string{
|
||||
"signrpc", "walletrpc", "chainrpc", "invoicesrpc",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// RPCConfig holds optional options that can be used to make the loop daemon
|
||||
// communicate on custom connections.
|
||||
type RPCConfig struct {
|
||||
|
|
@ -55,10 +70,11 @@ func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
|
|||
*lndclient.GrpcLndServices, error) {
|
||||
|
||||
svcCfg := &lndclient.LndServicesConfig{
|
||||
LndAddress: cfg.Host,
|
||||
Network: network,
|
||||
MacaroonDir: cfg.MacaroonDir,
|
||||
TLSPath: cfg.TLSPath,
|
||||
LndAddress: cfg.Host,
|
||||
Network: network,
|
||||
MacaroonDir: cfg.MacaroonDir,
|
||||
TLSPath: cfg.TLSPath,
|
||||
CheckVersion: LoopMinRequiredLndVersion,
|
||||
}
|
||||
|
||||
// If a custom lnd connection is specified we use that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue