Skip to content

Commit

Permalink
chore: fix base gas limit test
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Sep 26, 2024
1 parent 9a0f66e commit d13b0f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/anvil/tests/it/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,8 @@ async fn test_base_fork_gas_limit() {
.unwrap()
.unwrap();

assert_eq!(api.gas_limit(), uint!(120_000_000_U256));
assert_eq!(block.header.gas_limit, 120_000_000_u128);
assert!(api.gas_limit() >= uint!(132_000_000_U256));
assert!(block.header.gas_limit >= 132_000_000_u128);
}

// <https://github.com/foundry-rs/foundry/issues/7023>
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/test/expect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ pub(crate) fn handle_expect_emit(
let Some(expected) = &event_to_fill_or_check.log else {
// Unless the caller is trying to match an anonymous event, the first topic must be
// filled.
if event_to_fill_or_check.anonymous || log.topics().first().is_some() {
if event_to_fill_or_check.anonymous || !log.topics().is_empty() {
event_to_fill_or_check.log = Some(log.data.clone());
// If we only filled the expected log then we put it back at the same position.
state.expected_emits.insert(index_to_fill_or_check, event_to_fill_or_check);
Expand Down

0 comments on commit d13b0f2

Please sign in to comment.