github.com/decred/dcrlnd@v0.7.6/lnrpc/routerrpc/routing_config.go (about)

     1  package routerrpc
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/decred/dcrd/dcrutil/v4"
     7  )
     8  
     9  // RoutingConfig contains the configurable parameters that control routing.
    10  type RoutingConfig struct {
    11  	// MinRouteProbability is the minimum required route success
    12  	// probability to attempt the payment.
    13  	MinRouteProbability float64 `long:"minrtprob" description:"Minimum required route success probability to attempt the payment"`
    14  
    15  	// AprioriHopProbability is the assumed success probability of a hop in
    16  	// a route when no other information is available.
    17  	AprioriHopProbability float64 `long:"apriorihopprob" description:"Assumed success probability of a hop in a route when no other information is available."`
    18  
    19  	// AprioriWeight is a value in the range [0, 1] that defines to what
    20  	// extent historical results should be extrapolated to untried
    21  	// connections. Setting it to one will completely ignore historical
    22  	// results and always assume the configured a priori probability for
    23  	// untried connections. A value of zero will ignore the a priori
    24  	// probability completely and only base the probability on historical
    25  	// results, unless there are none available.
    26  	AprioriWeight float64 `long:"aprioriweight" description:"Weight of the a priori probability in success probability estimation. Valid values are in [0, 1]."`
    27  
    28  	// PenaltyHalfLife defines after how much time a penalized node or
    29  	// channel is back at 50% probability.
    30  	PenaltyHalfLife time.Duration `long:"penaltyhalflife" description:"Defines the duration after which a penalized node or channel is back at 50% probability"`
    31  
    32  	// AttemptCost is the fixed virtual cost in path finding of a failed
    33  	// payment attempt. It is used to trade off potentially better routes
    34  	// against their probability of succeeding.
    35  	AttemptCost dcrutil.Amount `long:"attemptcost" description:"The fixed (virtual) cost in sats of a failed payment attempt"`
    36  
    37  	// AttemptCostPPM is the proportional virtual cost in path finding of a
    38  	// failed payment attempt. It is used to trade off potentially better
    39  	// routes against their probability of succeeding. This parameter is
    40  	// expressed in parts per million of the total payment amount.
    41  	AttemptCostPPM int64 `long:"attemptcostppm" description:"The proportional (virtual) cost in sats of a failed payment attempt expressed in parts per million of the total payment amount"`
    42  
    43  	// MaxMcHistory defines the maximum number of payment results that
    44  	// are held on disk by mission control.
    45  	MaxMcHistory int `long:"maxmchistory" description:"the maximum number of payment results that are held on disk by mission control"`
    46  
    47  	// McFlushInterval defines the timer interval to use to flush mission
    48  	// control state to the DB.
    49  	McFlushInterval time.Duration `long:"mcflushinterval" description:"the timer interval to use to flush mission control state to the DB"`
    50  }