routing: add proportional attempt cost
This commit is contained in:
6 files changed
+69
-13
No files matched your search
@@ -47,6 +47,7 @@ func DefaultConfig() *Config {
|
||||
MinRouteProbability: routing.DefaultMinRouteProbability,
|
||||
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
|
||||
AttemptCost: routing.DefaultAttemptCost.ToSatoshis(),
|
||||
AttemptCostPPM: routing.DefaultAttemptCostPPM,
|
||||
MaxMcHistory: routing.DefaultMaxMcHistory,
|
||||
}
|
||||
|
||||
@@ -62,6 +63,7 @@ func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
||||
AprioriWeight: cfg.AprioriWeight,
|
||||
MinRouteProbability: cfg.MinRouteProbability,
|
||||
AttemptCost: cfg.AttemptCost,
|
||||
AttemptCostPPM: cfg.AttemptCostPPM,
|
||||
PenaltyHalfLife: cfg.PenaltyHalfLife,
|
||||
MaxMcHistory: cfg.MaxMcHistory,
|
||||
}
|
||||
|
||||
@@ -32,7 +32,13 @@ type RoutingConfig struct {
|
||||
// AttemptCost is the fixed virtual cost in path finding of a failed
|
||||
// payment attempt. It is used to trade off potentially better routes
|
||||
// against their probability of succeeding.
|
||||
AttemptCost btcutil.Amount `long:"attemptcost" description:"The (virtual) cost in sats of a failed payment attempt"`
|
||||
AttemptCost btcutil.Amount `long:"attemptcost" description:"The fixed (virtual) cost in sats of a failed payment attempt"`
|
||||
|
||||
// AttemptCostPPM is the proportional virtual cost in path finding of a
|
||||
// failed payment attempt. It is used to trade off potentially better
|
||||
// routes against their probability of succeeding. This parameter is
|
||||
// expressed in parts per million of the total payment amount.
|
||||
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"`
|
||||
|
||||
// MaxMcHistory defines the maximum number of payment results that
|
||||
// are held on disk by mission control.
|
||||
|
||||
Reference in new issue
Block a user