mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 21:55:45 +00:00
deps: replace lru with schnellru (#1217)
* deps: replace lru with schnellru * bring the peace to the galaxy
This commit is contained in:
@@ -22,7 +22,7 @@ sp-application-crypto = { path = "../../../../substrate/primitives/application-c
|
||||
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
|
||||
thiserror = "1.0.31"
|
||||
fatality = "0.0.6"
|
||||
lru = "0.11.0"
|
||||
schnellru = "0.2.1"
|
||||
indexmap = "1.9.1"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//! The sender is responsible for getting our vote out, see [`sender`]. The receiver handles
|
||||
//! incoming [`DisputeRequest`]s and offers spam protection, see [`receiver`].
|
||||
|
||||
use std::{num::NonZeroUsize, time::Duration};
|
||||
use std::time::Duration;
|
||||
|
||||
use futures::{channel::mpsc, FutureExt, StreamExt, TryFutureExt};
|
||||
|
||||
@@ -165,8 +165,7 @@ where
|
||||
) -> Self {
|
||||
let runtime = RuntimeInfo::new_with_config(runtime::Config {
|
||||
keystore: Some(keystore),
|
||||
session_cache_lru_size: NonZeroUsize::new(DISPUTE_WINDOW.get() as usize)
|
||||
.expect("Dispute window can not be 0; qed"),
|
||||
session_cache_lru_size: DISPUTE_WINDOW.get(),
|
||||
});
|
||||
let (tx, sender_rx) = NestingSender::new_root(1);
|
||||
let disputes_sender = DisputeSender::new(tx, metrics.clone());
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{
|
||||
num::NonZeroUsize,
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
time::Duration,
|
||||
@@ -161,8 +160,7 @@ where
|
||||
) -> Self {
|
||||
let runtime = RuntimeInfo::new_with_config(runtime::Config {
|
||||
keystore: None,
|
||||
session_cache_lru_size: NonZeroUsize::new(DISPUTE_WINDOW.get() as usize)
|
||||
.expect("Dispute window can not be 0; qed"),
|
||||
session_cache_lru_size: DISPUTE_WINDOW.get(),
|
||||
});
|
||||
Self {
|
||||
runtime,
|
||||
|
||||
Reference in New Issue
Block a user