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
@@ -15,7 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use futures::{select, StreamExt};
use lru::LruCache;
use schnellru::{ByLength, LruMap};
use std::sync::Arc;
use polkadot_availability_recovery::AvailabilityRecoverySubsystem;
@@ -157,7 +157,7 @@ fn build_overseer(
.span_per_active_leaf(Default::default())
.active_leaves(Default::default())
.supports_parachains(runtime_client)
.known_leaves(LruCache::new(KNOWN_LEAVES_CACHE_SIZE))
.known_leaves(LruMap::new(ByLength::new(KNOWN_LEAVES_CACHE_SIZE)))
.metrics(Metrics::register(registry)?)
.spawner(spawner);