deps: replace lru with schnellru (#1217)

* deps: replace lru with schnellru

* bring the peace to the galaxy
This commit is contained in:
ordian
2023-08-28 19:04:11 +02:00
committed by GitHub
parent 7125f65fe6
commit c168a77e26
32 changed files with 207 additions and 241 deletions
@@ -30,7 +30,7 @@ struct State {
/// A recent block hash for which state should be available.
live_block_hash: Hash,
// An LRU cache of recently recovered data.
availability_lru: LruCache<CandidateHash, Result<AvailableData, RecoveryError>>,
availability_lru: LruMap<CandidateHash, Result<AvailableData, RecoveryError>>,
}
/// This is a future, which concludes either when a response is received from the recovery tasks,
@@ -9,7 +9,7 @@ In particular the dispute-coordinator is responsible for:
- Ensuring that the node is able to raise a dispute in case an invalid candidate
is found during approval checking.
- Ensuring that backing and approval votes will be recorded on chain. With these
- Ensuring that backing and approval votes will be recorded on chain. With these
votes on chain we can be certain that appropriate targets for slashing will be
available for concluded disputes. Also, scraping these votes during a dispute
is necessary for critical spam prevention measures.
@@ -678,7 +678,7 @@ struct State {
// It can be a `Vec` if the need to track more arises.
error: Option<SessionsUnavailable>,
/// Latest relay blocks that have been successfully scraped.
last_scraped_blocks: LruCache<Hash, ()>,
last_scraped_blocks: LruMap<Hash, ()>,
}
```