Skip to content

Commit 82051b7

Browse files
authored
Merge pull request #14 from ithacaxyz/matt/cap-block-range
chore: cap common tip
2 parents cad89d7 + 44298c1 commit 82051b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/rpc-tester-cli/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ pub async fn wait_for_readiness<P: Provider<AnyNetwork>>(
106106
let tip2 = rpc2.get_block_number().await?;
107107

108108
if tip1 >= tip2 || tip2 - tip1 <= 5 {
109-
let range = tip2 - (block_size_range - 1)..=tip2;
109+
let common = tip1.min(tip2);
110+
let range = common - (block_size_range - 1)..=common;
110111
info!(?range, "testing block range");
111112
return Ok(range);
112113
}

0 commit comments

Comments
 (0)