Tariffs: sort by time when merging rate updates
This commit is contained in:
parent
173f4e5bc2
commit
c44939ceee
1 changed files with 2 additions and 0 deletions
|
|
@ -48,6 +48,8 @@ func mergeRates(data *util.Monitor[api.Rates], new api.Rates) {
|
|||
|
||||
// mergeRatesAfter blends new and existing rates, keeping existing rates after timestamp
|
||||
func mergeRatesAfter(data *util.Monitor[api.Rates], new api.Rates, now time.Time) {
|
||||
new.Sort()
|
||||
|
||||
var newStart time.Time
|
||||
if len(new) > 0 {
|
||||
new.Sort()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue