multi: remove experimential build flag for assumechanvalid

This commit is contained in:
carla 2020-10-21 11:22:34 +02:00
parent 325deb36c0
commit c92b030652
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91
6 changed files with 10 additions and 30 deletions

@ -269,12 +269,12 @@ vendor:
ios: vendor mobile-rpc ios: vendor mobile-rpc
@$(call print, "Building iOS framework ($(IOS_BUILD)).") @$(call print, "Building iOS framework ($(IOS_BUILD)).")
mkdir -p $(IOS_BUILD_DIR) 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 android: vendor mobile-rpc
@$(call print, "Building Android library ($(ANDROID_BUILD)).") @$(call print, "Building Android library ($(ANDROID_BUILD)).")
mkdir -p $(ANDROID_BUILD_DIR) 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 mobile: ios android

@ -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."` 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"` Workers *lncfg.Workers `group:"workers" namespace:"workers"`

6
lncfg/routing.go Normal file

@ -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)"`
}

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

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

@ -761,7 +761,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
ChannelPruneExpiry: routing.DefaultChannelPruneExpiry, ChannelPruneExpiry: routing.DefaultChannelPruneExpiry,
GraphPruneInterval: time.Duration(time.Hour), GraphPruneInterval: time.Duration(time.Hour),
QueryBandwidth: queryBandwidth, QueryBandwidth: queryBandwidth,
AssumeChannelValid: cfg.Routing.UseAssumeChannelValid(), AssumeChannelValid: cfg.Routing.AssumeChannelValid,
NextPaymentID: sequencer.NextID, NextPaymentID: sequencer.NextID,
PathFindingConfig: pathFindingConfig, PathFindingConfig: pathFindingConfig,
Clock: clock.NewDefaultClock(), Clock: clock.NewDefaultClock(),