mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
only retain one day of mempool rate sizes
This commit is contained in:
parent
82f9a0f2af
commit
7423d94935
1 changed files with 3 additions and 0 deletions
|
@ -615,6 +615,9 @@ public class AppServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
mempoolHistogram.put(Date.from(dateMinute.atZone(ZoneId.systemDefault()).toInstant()), rateSizes);
|
mempoolHistogram.put(Date.from(dateMinute.atZone(ZoneId.systemDefault()).toInstant()), rateSizes);
|
||||||
|
|
||||||
|
Date yesterday = Date.from(LocalDateTime.now().minusDays(1).atZone(ZoneId.systemDefault()).toInstant());
|
||||||
|
mempoolHistogram.keySet().removeIf(date -> date.before(yesterday));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Double getMinimumRelayFeeRate() {
|
public static Double getMinimumRelayFeeRate() {
|
||||||
|
|
Loading…
Reference in a new issue