Skip to content

Commit

Permalink
fix: account for updated candle
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Van Ootegem <[email protected]>
  • Loading branch information
EVODelavega committed Aug 12, 2024
1 parent 512d4be commit bf1a933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datanode/candlesv2/candle_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit bf1a933

Please sign in to comment.