From 925ad9d18f064575e064cb28edd0d0c4093959e9 Mon Sep 17 00:00:00 2001 From: Carlton Hanna Date: Mon, 30 Oct 2023 11:16:54 -0600 Subject: [PATCH] Rollup Start of day fix (#497) * add start of day * add tmp fix * tmp delete then insert, removing after testing * rollback testing changes * Remove unneeded line * Add missing changelog entry, remove unused import --- CHANGELOG.md | 4 ++++ .../io/provenance/explorer/service/async/AsyncService.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d00012c9..0f1c5496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### Improvements +* Add aggregation of orderbooks for hash historical pricing [#496](https://github.com/provenance-io/explorer-service/issues/496) + + ## [v5.6.0](https://github.com/provenance-io/explorer-service/releases/tag/v5.6.0) - 2023-07-05 ### Release Name: Niels Peter diff --git a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt index 7ffe1c46..7f33fe7a 100644 --- a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt +++ b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt @@ -296,7 +296,7 @@ class AsyncService( var startDate = today.minusMonths(1) val latest = TokenHistoricalDailyRecord.getLatestDateEntry() if (latest != null) { - startDate = latest.timestamp.minusDays(1) + startDate = latest.timestamp.minusDays(1).startOfDay() } val dlobRes = tokenService.getHistoricalFromDlob(startDate) ?: return logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy records for roll-up.")