|
|
|
@ -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
|
|
|
|
|