Skip to content

Commit

Permalink
Update cycles-ledger/src/storage.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Kashitsyn <[email protected]>
  • Loading branch information
maciejdfinity and roman-kashitsyn authored Aug 18, 2023
1 parent 0493df6 commit 485deb4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cycles-ledger/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,17 +606,13 @@ fn prune(s: &mut State, now: u64, limit: usize) -> usize {
if key.0 > now {
return pruned;
}
}
None => {
return pruned;
}
}
if let Some((key, _value)) = s.expiration_queue.first_key_value() {
if key.0 <= now {
s.approvals.remove(&key.1);
s.expiration_queue.remove(&key);
pruned += 1;
}
None => {
return pruned;
}
}
}
debug_assert!(
Expand Down

0 comments on commit 485deb4

Please sign in to comment.