Skip to content

Commit 2b9fc85

Browse files
committed
chore: handle corner case for insecure follow request
1 parent 8dba40d commit 2b9fc85

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/chain/sync.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,10 @@ impl<S: Scheme, B: BeaconRepr> DefaultSyncer<S, B> {
321321
debug!(&log, "sync request cancelled: synced {}, latest_stored {}", last_stored.round() - started_from, last_stored.round());
322322
return Ok(());
323323
}
324-
if last_stored.round() == target {
325-
debug!(&log, "finished syncing up_to {target} round");
324+
// With verification disabled, an inconsistent sync node database might send
325+
// a later round instead of target, so we check for rounds ≥ target.
326+
if last_stored.round() >= target {
327+
debug!(&log, "finished syncing: up_to {target} round, latest_stored {}", last_stored.round());
326328
return Ok(());
327329
}
328330
}

src/net/pool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ impl Pool {
166166
beacons: Vec::with_capacity(3),
167167
log,
168168
};
169-
info!(&pool.log, "initialing empty pool...");
170169

171170
loop {
172171
tokio::select! {

0 commit comments

Comments
 (0)