From bf1a93334c5b57e96c371c3ae8af2b803facde7d Mon Sep 17 00:00:00 2001 From: Elias Van Ootegem Date: Mon, 12 Aug 2024 13:43:12 +0100 Subject: [PATCH] fix: account for updated candle Signed-off-by: Elias Van Ootegem --- datanode/candlesv2/candle_updates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datanode/candlesv2/candle_updates.go b/datanode/candlesv2/candle_updates.go index 348ae8bbb6..41fb0e0d36 100644 --- a/datanode/candlesv2/candle_updates.go +++ b/datanode/candlesv2/candle_updates.go @@ -197,7 +197,7 @@ func (s *CandleUpdates) getCandleUpdates(ctx context.Context, lastCandle *entiti } for _, candle := range candles { - if candle.PeriodStart.After(lastCandle.PeriodStart) { + if candle.LastUpdateInPeriod.After(lastCandle.LastUpdateInPeriod) || candle.PeriodStart.After(lastCandle.PeriodStart) { updates = append(updates, candle) } }