Skip to content

Commit c3db6a8

Browse files
committed
refactor: rename fn
1 parent 07e398a commit c3db6a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/net/discovery.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ use n0_future::{
1717

1818
pub(crate) struct RetentionOpts {
1919
retention: Duration,
20-
check_interval: Duration,
20+
evict_interval: Duration,
2121
}
2222

2323
impl Default for RetentionOpts {
2424
fn default() -> Self {
2525
Self {
2626
retention: Duration::from_secs(60 * 5),
27-
check_interval: Duration::from_secs(30),
27+
evict_interval: Duration::from_secs(30),
2828
}
2929
}
3030
}
@@ -67,7 +67,7 @@ impl GossipDiscovery {
6767
let nodes = Arc::downgrade(&nodes);
6868
n0_future::task::spawn(async move {
6969
loop {
70-
n0_future::time::sleep(opts.check_interval).await;
70+
n0_future::time::sleep(opts.evict_interval).await;
7171
let Some(nodes) = nodes.upgrade() else {
7272
break;
7373
};
@@ -141,7 +141,7 @@ mod tests {
141141
#[tokio::test]
142142
async fn test_retention() {
143143
let opts = RetentionOpts {
144-
check_interval: Duration::from_millis(100),
144+
evict_interval: Duration::from_millis(100),
145145
retention: Duration::from_millis(500),
146146
};
147147
let disco = GossipDiscovery::with_opts(opts);

0 commit comments

Comments
 (0)