From 6df5296dcdc95e4ff5b97fdda35aa8f382bd9ac3 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 19 May 2024 11:57:50 -0400 Subject: [PATCH] deduplicate trade history before may 31, 2024 --- .../core/trade/statistics/TradeStatisticsManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java index 4ec3a2d51e..086470c318 100644 --- a/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java @@ -113,15 +113,15 @@ public class TradeStatisticsManager { private void deduplicateEarlyTradeStatistics(Set set) { - // collect trades before May 18, 2024 - Set tradesBeforeMay18_24 = set.stream() - .filter(e -> e.getDate().toInstant().isBefore(Instant.parse("2024-05-18T00:00:00Z"))) + // collect trades before May 31, 2024 + Set tradesBeforeMay31_24 = set.stream() + .filter(e -> e.getDate().toInstant().isBefore(Instant.parse("2024-05-31T00:00:00Z"))) .collect(Collectors.toSet()); // collect duplicated trades Set duplicated = new HashSet(); Set deduplicated = new HashSet(); - for (TradeStatistics3 tradeStatistics : tradesBeforeMay18_24) { + for (TradeStatistics3 tradeStatistics : tradesBeforeMay31_24) { if (hasLenientDuplicate(tradeStatistics, deduplicated)) duplicated.add(tradeStatistics); else deduplicated.add(tradeStatistics); }