mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
fix: use saturated range (#2694)
This commit is contained in:
@ -167,7 +167,9 @@ where
|
||||
}
|
||||
|
||||
let mut result = Vec::with_capacity(count as usize);
|
||||
for num in start..start + count {
|
||||
|
||||
let end = start.saturating_add(count);
|
||||
for num in start..end {
|
||||
let block = self
|
||||
.client
|
||||
.block(BlockHashOrNumber::Number(num))
|
||||
|
||||
Reference in New Issue
Block a user