lnd.xprv/lnrpc/routerrpc/config.go

29 lines
865 B
Go
Raw Normal View History

package routerrpc
import (
"time"
"github.com/lightningnetwork/lnd/lnwire"
)
// RoutingConfig contains the configurable parameters that control routing.
type RoutingConfig struct {
// PenaltyHalfLife defines after how much time a penalized node or
// channel is back at 50% probability.
PenaltyHalfLife time.Duration
// PaymentAttemptPenalty is the virtual cost in path finding weight
// units of executing a payment attempt that fails. It is used to trade
// off potentially better routes against their probability of
// succeeding.
PaymentAttemptPenalty lnwire.MilliSatoshi
// MinProbability defines the minimum success probability of the
// returned route.
MinRouteProbability float64
// AprioriHopProbability is the assumed success probability of a hop in
// a route when no other information is available.
AprioriHopProbability float64
}