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
+1 -1
View File
@@ -86,7 +86,7 @@ parity-db = { version = "0.4.8", optional = true }
codec = { package = "parity-scale-codec", version = "3.6.1" }
async-trait = "0.1.57"
lru = "0.11.0"
schnellru = "0.2.1"
log = "0.4.17"
is_executable = "1.0.1"
+2 -2
View File
@@ -19,7 +19,6 @@ use polkadot_node_subsystem_types::DefaultSubsystemClient;
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_core::traits::SpawnNamed;
use lru::LruCache;
use polkadot_availability_distribution::IncomingRequestReceivers;
use polkadot_node_core_approval_voting::Config as ApprovalVotingConfig;
use polkadot_node_core_av_store::Config as AvailabilityConfig;
@@ -41,6 +40,7 @@ use polkadot_overseer::{
metrics::Metrics as OverseerMetrics, InitializedOverseerBuilder, MetricsTrait, Overseer,
OverseerConnector, OverseerHandle, SpawnGlue,
};
use schnellru::{ByLength, LruMap};
use polkadot_primitives::runtime_api::ParachainHost;
use sc_authority_discovery::Service as AuthorityDiscoveryService;
@@ -344,7 +344,7 @@ where
.span_per_active_leaf(Default::default())
.active_leaves(Default::default())
.supports_parachains(runtime_api_client)
.known_leaves(LruCache::new(KNOWN_LEAVES_CACHE_SIZE))
.known_leaves(LruMap::new(ByLength::new(KNOWN_LEAVES_CACHE_SIZE)))
.metrics(metrics)
.spawner(spawner);