Skip to content

Commit ec9cba3

Browse files
authored
Merge pull request #68 from HyperTekOrg/slot-hash
fix: Reduce cache size for slot hashes
2 parents 8cf42d1 + 5d140a4 commit ec9cba3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/hyperstack-server/src/health.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ impl SlotTracker {
3939
pub async fn record_slot_hash(&self, slot: u64, slot_hash: String) {
4040
let mut hashes = self.slot_hashes.write().await;
4141
hashes.insert(slot, slot_hash);
42-
42+
4343
// Prune old entries to prevent unbounded growth (keep last 10000 slots)
4444
let slots_to_remove: Vec<u64> = hashes
4545
.keys()
46-
.filter(|&&s| s < slot.saturating_sub(10000))
46+
.filter(|&&s| s < slot.saturating_sub(1000))
4747
.copied()
4848
.collect();
4949
for s in slots_to_remove {

0 commit comments

Comments
 (0)