multi: fee estimation timeout parameters

conf: fee estimation timeout in sample config
This commit is contained in:
Slyghtning 2023-10-31 14:46:07 +01:00
parent 721038d1a4
commit 24080c51f9
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
4 changed files with 13 additions and 0 deletions

View file

@ -69,6 +69,7 @@ func DefaultConfig() *Config {
NodeWeight: routing.DefaultBimodalNodeWeight, NodeWeight: routing.DefaultBimodalNodeWeight,
DecayTime: routing.DefaultBimodalDecayTime, DecayTime: routing.DefaultBimodalDecayTime,
}, },
FeeEstimationTimeout: routing.DefaultFeeEstimationTimeout,
} }
return &Config{ return &Config{
@ -96,5 +97,6 @@ func GetRoutingConfig(cfg *Config) *RoutingConfig {
NodeWeight: cfg.BimodalConfig.NodeWeight, NodeWeight: cfg.BimodalConfig.NodeWeight,
DecayTime: cfg.BimodalConfig.DecayTime, DecayTime: cfg.BimodalConfig.DecayTime,
}, },
FeeEstimationTimeout: cfg.FeeEstimationTimeout,
} }
} }

View file

@ -41,6 +41,9 @@ type RoutingConfig struct {
// BimodalConfig defines parameters for the bimodal probability. // BimodalConfig defines parameters for the bimodal probability.
BimodalConfig *BimodalConfig `group:"bimodal" namespace:"bimodal" description:"configuration for the bimodal pathfinding probability estimator"` BimodalConfig *BimodalConfig `group:"bimodal" namespace:"bimodal" description:"configuration for the bimodal pathfinding probability estimator"`
// FeeEstimationTimeout is the maximum time to wait for routing fees to be estimated.
FeeEstimationTimeout time.Duration `long:"fee-estimation-timeout" description:"the maximum time to wait for routing fees to be estimated by payment probes"`
} }
// AprioriConfig defines parameters for the apriori probability. // AprioriConfig defines parameters for the apriori probability.

View file

@ -62,6 +62,11 @@ const (
// have passed since the previously recorded failure before the failure // have passed since the previously recorded failure before the failure
// amount may be raised. // amount may be raised.
DefaultMinFailureRelaxInterval = time.Minute DefaultMinFailureRelaxInterval = time.Minute
// DefaultFeeEstimationTimeout is the default value for
// FeeEstimationTimeout. It defines the maximum duration that the
// probing fee estimation is allowed to take.
DefaultFeeEstimationTimeout = time.Minute
) )
var ( var (

View file

@ -1205,6 +1205,9 @@
; `Payment_In_FLIGHT` will be sent for compatibility concerns. ; `Payment_In_FLIGHT` will be sent for compatibility concerns.
; routerrpc.usestatusinitiated=false ; routerrpc.usestatusinitiated=false
; Defines the the maximum duration that the probing fee estimation is allowed to
; take.
; routerrpc.fee-estimation-timeout=1m
[workers] [workers]