diff --git a/Makefile b/Makefile index f28bef3d..5f55f0bc 100644 --- a/Makefile +++ b/Makefile @@ -269,12 +269,12 @@ vendor: ios: vendor mobile-rpc @$(call print, "Building iOS framework ($(IOS_BUILD)).") mkdir -p $(IOS_BUILD_DIR) - $(GOMOBILE_BIN) bind -target=ios -tags="mobile $(DEV_TAGS) autopilotrpc experimental" $(LDFLAGS) -v -o $(IOS_BUILD) $(MOBILE_PKG) + $(GOMOBILE_BIN) bind -target=ios -tags="mobile $(DEV_TAGS) autopilotrpc" $(LDFLAGS) -v -o $(IOS_BUILD) $(MOBILE_PKG) android: vendor mobile-rpc @$(call print, "Building Android library ($(ANDROID_BUILD)).") mkdir -p $(ANDROID_BUILD_DIR) - $(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) autopilotrpc experimental" $(LDFLAGS) -v -o $(ANDROID_BUILD) $(MOBILE_PKG) + $(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) autopilotrpc" $(LDFLAGS) -v -o $(ANDROID_BUILD) $(MOBILE_PKG) mobile: ios android diff --git a/config.go b/config.go index e576284a..7a299bf1 100644 --- a/config.go +++ b/config.go @@ -285,7 +285,7 @@ type Config struct { GcCanceledInvoicesOnTheFly bool `long:"gc-canceled-invoices-on-the-fly" description:"If true, we'll delete newly canceled invoices on the fly."` - Routing *routing.Conf `group:"routing" namespace:"routing"` + Routing *lncfg.Routing `group:"routing" namespace:"routing"` Workers *lncfg.Workers `group:"workers" namespace:"workers"` diff --git a/lncfg/routing.go b/lncfg/routing.go new file mode 100644 index 00000000..2eabb38e --- /dev/null +++ b/lncfg/routing.go @@ -0,0 +1,6 @@ +package lncfg + +// Routing holds the configuration options for routing. +type Routing struct { + AssumeChannelValid bool `long:"assumechanvalid" description:"Skip checking channel spentness during graph validation. This speedup comes at the risk of using an unvalidated view of the network for routing. (default: false)"` +} diff --git a/routing/conf.go b/routing/conf.go deleted file mode 100644 index ccce7c38..00000000 --- a/routing/conf.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !experimental - -package routing - -// Conf provides the command line routing configuration. There are no fields in -// the production build so that this section is hidden by default. -type Conf struct{} - -// UseAssumeChannelValid always returns false when not in experimental builds. -func (c *Conf) UseAssumeChannelValid() bool { - return false -} diff --git a/routing/conf_experimental.go b/routing/conf_experimental.go deleted file mode 100644 index 5c11c9cd..00000000 --- a/routing/conf_experimental.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build experimental - -package routing - -// Conf exposes the experimental command line routing configurations. -type Conf struct { - AssumeChannelValid bool `long:"assumechanvalid" description:"Skip checking channel spentness during graph validation. (default: false)"` -} - -// UseAssumeChannelValid returns true if the router should skip checking for -// spentness when processing channel updates and announcements. -func (c *Conf) UseAssumeChannelValid() bool { - return c.AssumeChannelValid -} diff --git a/server.go b/server.go index 177d0892..edb74ca8 100644 --- a/server.go +++ b/server.go @@ -761,7 +761,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, ChannelPruneExpiry: routing.DefaultChannelPruneExpiry, GraphPruneInterval: time.Duration(time.Hour), QueryBandwidth: queryBandwidth, - AssumeChannelValid: cfg.Routing.UseAssumeChannelValid(), + AssumeChannelValid: cfg.Routing.AssumeChannelValid, NextPaymentID: sequencer.NextID, PathFindingConfig: pathFindingConfig, Clock: clock.NewDefaultClock(),