aboutsummaryrefslogtreecommitdiff
path: root/src/peering/basalt.rs
diff options
context:
space:
mode:
authorJonathan Davies <jpds@protonmail.com>2023-01-31 13:37:09 +0000
committerJonathan Davies <jpds@protonmail.com>2023-02-01 08:59:17 +0000
commit14ba9a811f9576dbbbb6368357a0a356aeb25cde (patch)
treec4c085aa82214384ae98e03f6ff0dd58e7e845ff /src/peering/basalt.rs
parent989193296c980943a7684d93ac0f6965329e547e (diff)
downloadnetapp-14ba9a811f9576dbbbb6368357a0a356aeb25cde.tar.gz
netapp-14ba9a811f9576dbbbb6368357a0a356aeb25cde.zip
basalt: Adapt to use NonZeroUsize for lru change.
Diffstat (limited to 'src/peering/basalt.rs')
-rw-r--r--src/peering/basalt.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs
index 2c27dba..21506a7 100644
--- a/src/peering/basalt.rs
+++ b/src/peering/basalt.rs
@@ -1,5 +1,6 @@
use std::collections::HashSet;
use std::net::SocketAddr;
+use std::num::NonZeroUsize;
use std::sync::{Arc, RwLock};
use std::time::Duration;
@@ -229,7 +230,7 @@ impl BasaltView {
pub struct BasaltParams {
pub view_size: usize,
- pub cache_size: usize,
+ pub cache_size: NonZeroUsize,
pub exchange_interval: Duration,
pub reset_interval: Duration,
pub reset_count: usize,