Skip to content

Commit

Permalink
fix(anvil): dont adjust from block (foundry-rs#4733)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Apr 13, 2023
1 parent 3117e50 commit c92dabc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,12 @@ impl Backend {
let to_block =
self.convert_block_number(filter.block_option.get_to_block().copied()).min(best);
let from_block =
self.convert_block_number(filter.block_option.get_from_block().copied()).min(best);
self.convert_block_number(filter.block_option.get_from_block().copied());
if from_block > best {
// requested log range does not exist yet
return Ok(vec![])
}

self.logs_for_range(&filter, from_block, to_block).await
}
}
Expand Down

0 comments on commit c92dabc

Please sign in to comment.