2018-10-23 07:45:44 +03:00
|
|
|
// +build !routerrpc
|
|
|
|
|
|
|
|
package routerrpc
|
|
|
|
|
2019-05-22 12:56:04 +03:00
|
|
|
import "github.com/lightningnetwork/lnd/routing"
|
|
|
|
|
|
|
|
// Config is the default config struct for the package. When the build tag isn't
|
2018-10-23 07:45:44 +03:00
|
|
|
// specified, then we output a blank config.
|
|
|
|
type Config struct{}
|
2019-05-22 12:56:04 +03:00
|
|
|
|
|
|
|
// DefaultConfig defines the config defaults. Without the sub server enabled,
|
|
|
|
// there are no defaults to set.
|
|
|
|
func DefaultConfig() *Config {
|
|
|
|
return &Config{}
|
|
|
|
}
|
|
|
|
|
2019-06-18 19:30:56 +03:00
|
|
|
// GetRoutingConfig returns the routing config based on this sub server config.
|
|
|
|
func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
|
|
|
return &RoutingConfig{
|
2019-05-22 12:56:04 +03:00
|
|
|
AprioriHopProbability: routing.DefaultAprioriHopProbability,
|
|
|
|
MinRouteProbability: routing.DefaultMinRouteProbability,
|
|
|
|
PaymentAttemptPenalty: routing.DefaultPaymentAttemptPenalty,
|
|
|
|
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
|
|
|
|
}
|
|
|
|
}
|