Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
catch TracingError for max initcode size exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
ChihChengLiang committed Sep 27, 2023
1 parent 37f9ef8 commit 22c7723
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions testool/src/statetest/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use bus_mapping::{
circuit_input_builder::{CircuitInputBuilder, FixedCParams},
mock::BlockData,
};
use eth_types::{geth_types, Address, Bytes, GethExecTrace, U256, U64};
use eth_types::{geth_types, Address, Bytes, Error, GethExecTrace, U256, U64};
use ethers_core::{
k256::ecdsa::SigningKey,
types::{transaction::eip2718::TypedTransaction, TransactionRequest},
Expand Down Expand Up @@ -235,10 +235,18 @@ pub fn run_test(
}
(Err(_), true) => return Ok(()),
(Err(err), false) => {
if let Error::TracingError(ref err) = err {
if err.contains("max initcode size exceeded") {
return Err(StateTestError::Exception {
expected: true,
found: err.to_string(),
});
}
}
return Err(StateTestError::Exception {
expected: false,
found: err.to_string(),
})
});
}
};

Expand Down

0 comments on commit 22c7723

Please sign in to comment.