Skip to content

Commit ec91821

Browse files
committed
feat: test neighbors with stale views
1 parent 8e04978 commit ec91821

File tree

1 file changed

+5
-0
lines changed
  • stackslib/src/net/stackerdb

1 file changed

+5
-0
lines changed

stackslib/src/net/stackerdb/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ pub struct StackerDBSyncResult {
151151
dead: HashSet<NeighborKey>,
152152
/// neighbors that misbehaved while syncing
153153
broken: HashSet<NeighborKey>,
154+
/// neighbors that have stale views, but are otherwise online
155+
pub(crate) stale: HashSet<NeighborAddress>,
154156
}
155157

156158
/// Settings for the Stacker DB
@@ -262,6 +264,8 @@ pub struct StackerDBSync<NC: NeighborComms> {
262264
/// whether or not we should immediately re-fetch chunks because we learned about new chunks
263265
/// from our peers when they replied to our chunk-pushes with new inventory state
264266
need_resync: bool,
267+
/// Track stale neighbors
268+
pub(crate) stale_neighbors: HashSet<NeighborAddress>,
265269
}
266270

267271
impl StackerDBSyncResult {
@@ -274,6 +278,7 @@ impl StackerDBSyncResult {
274278
chunks_to_store: vec![chunk.chunk_data],
275279
dead: HashSet::new(),
276280
broken: HashSet::new(),
281+
stale: HashSet::new(),
277282
}
278283
}
279284
}

0 commit comments

Comments
 (0)