lnd.xprv/lnrpc/routerrpc/config_default.go

28 lines
856 B
Go
Raw Normal View History

// +build !routerrpc
package routerrpc
import "github.com/lightningnetwork/lnd/routing"
// Config is the default config struct for the package. When the build tag isn't
// specified, then we output a blank config.
type Config struct{}
// DefaultConfig defines the config defaults. Without the sub server enabled,
// there are no defaults to set.
func DefaultConfig() *Config {
return &Config{}
}
// GetRoutingConfig returns the routing config based on this sub server config.
func GetRoutingConfig(cfg *Config) *RoutingConfig {
return &RoutingConfig{
AprioriHopProbability: routing.DefaultAprioriHopProbability,
MinRouteProbability: routing.DefaultMinRouteProbability,
2019-07-14 00:26:26 +03:00
AttemptCost: routing.DefaultPaymentAttemptPenalty.
ToSatoshis(),
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
2019-06-26 14:00:35 +03:00
MaxMcHistory: routing.DefaultMaxMcHistory,
}
}