lnd.xprv/lnrpc/routerrpc/config_default.go
Joost Jager 1fac41deed
routing+routerrpc: improve prob. estimation for untried connections
This commit changes mission control to partially base the estimated
probability for untried connections on historical results obtained in
previous payment attempts. This incentivizes routing nodes to keep all
of their channels in good shape.
2019-10-22 15:52:38 +02:00

29 lines
911 B
Go

// +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,
AprioriWeight: routing.DefaultAprioriWeight,
MinRouteProbability: routing.DefaultMinRouteProbability,
AttemptCost: routing.DefaultPaymentAttemptPenalty.
ToSatoshis(),
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
MaxMcHistory: routing.DefaultMaxMcHistory,
}
}