mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
routing: store missioncontrol state in blocks and eliminate cursor use
This commit changes missioncontrol's store update from per payment to every second. Updating the missioncontrol store on every payment caused gradual slowdown when using etcd. We also completely eliminate the use of the cursor, further reducing the performance bottleneck.
This commit is contained in:
@@ -49,6 +49,7 @@ func DefaultConfig() *Config {
|
||||
AttemptCost: routing.DefaultAttemptCost.ToSatoshis(),
|
||||
AttemptCostPPM: routing.DefaultAttemptCostPPM,
|
||||
MaxMcHistory: routing.DefaultMaxMcHistory,
|
||||
McFlushInterval: routing.DefaultMcFlushInterval,
|
||||
}
|
||||
|
||||
return &Config{
|
||||
@@ -66,5 +67,6 @@ func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
||||
AttemptCostPPM: cfg.AttemptCostPPM,
|
||||
PenaltyHalfLife: cfg.PenaltyHalfLife,
|
||||
MaxMcHistory: cfg.MaxMcHistory,
|
||||
McFlushInterval: cfg.McFlushInterval,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user