routing/conf: add experimental assume valid conf

This commit is contained in:
Conner Fromknecht 2018-08-31 19:24:54 -07:00
parent af0265f8fa
commit 89113654fe
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
2 changed files with 26 additions and 0 deletions

12
routing/conf.go Normal file

@ -0,0 +1,12 @@
// +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
}

@ -0,0 +1,14 @@
// +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
}