We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e09e8f + 6671dcf commit c2f52baCopy full SHA for c2f52ba
1 file changed
node/sync/src/block_sync.rs
@@ -2122,7 +2122,10 @@ mod tests {
2122
let rng = &mut TestRng::default();
2123
let sync = sample_sync_at_height(0);
2124
2125
- let locator_height = rng.random_range(0..50);
+ // Ensure the locator always includes at least one block,
2126
+ // that is not the genesis block.
2127
+ // Otherwise there are no block requests to construct.
2128
+ let locator_height = rng.random_range(1..50);
2129
2130
// Add a peer.
2131
let locators = sample_block_locators(locator_height);
0 commit comments