Fix node cache lifetime parameter not applying

pull/20/head v1.6.1
rkfg 2 years ago
parent 5aeff0476e
commit 9e2e01487f

@ -50,7 +50,7 @@ type configParams struct {
AllowUnbalanceTo bool `long:"allow-unbalance-to" description:"let the target channel go above 50% local liquidity, use if you want to refill a channel; you should also set --pto to >50" json:"allow_unbalance_to" toml:"allow_unbalance_to"`
StatFilename string `short:"s" long:"stat" description:"save successful rebalance information to the specified CSV file" json:"stat" toml:"stat"`
NodeCacheFilename string `long:"node-cache-filename" description:"save and load other nodes information to this file, improves cold start performance" json:"node_cache_filename" toml:"node_cache_filename"`
NodeCacheLifetime int `long:"node-cache-lifetime" description:"nodes with last update older than this time (in minutes) will be removed from cache after loading it" json:"node_cache_lifetime" toml:"node_cache_lifetime" default:"1440"`
NodeCacheLifetime int `long:"node-cache-lifetime" description:"nodes with last update older than this time (in minutes) will be removed from cache after loading it" json:"node_cache_lifetime" toml:"node_cache_lifetime"`
NodeCacheInfo bool `long:"node-cache-info" description:"show red and cyan 'x' characters in routes to indicate node cache misses and hits respectively" json:"node_cache_info" toml:"node_cache_info"`
}
@ -368,6 +368,9 @@ func preflightChecks(params *configParams) error {
return fmt.Errorf("use either relative amounts or rapid rebalance but not both")
}
if params.NodeCacheLifetime == 0 {
params.NodeCacheLifetime = 1440
}
return nil

Loading…
Cancel
Save