Skip to content

Commit f36e0e6

Browse files
committed
some cleanup
1 parent afce06e commit f36e0e6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bins/revme/src/cmd/eofvalidation.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,21 @@ pub fn run_test(path: &Path) -> Result<(), Error> {
8181
} else {
8282
Some(CodeType::ReturnOrStop)
8383
};
84-
let test_result = test_vector.results.get("Osaka");
84+
// In future this can be generalized to cover multiple forks, Not just Osaka.
85+
let Some(test_result) = test_vector.results.get("Osaka") else {
86+
// if test does not have a result that we can compare to, we skip it
87+
println!("Test without result: {} - {}", name, vector_name);
88+
continue;
89+
};
8590
let res = validate_raw_eof_inner(test_vector.code.clone(), kind);
86-
if test_result.map(|r| r.result).unwrap_or(res.is_ok()) != res.is_ok() {
91+
if test_result.result != res.is_ok() {
8792
println!(
8893
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nExpected exception:{:?}\nbytes:{:?}\n",
8994
name,
9095
vector_name,
91-
test_result.unwrap().result,
96+
test_result.result,
9297
res.as_ref().err(),
93-
test_result.unwrap().exception,
98+
test_result.exception,
9499
test_vector.code
95100
);
96101
*types_of_error

bins/revme/src/cmd/statetest/runner.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,7 @@ pub fn execute_test_suite(
342342
continue;
343343
}
344344

345-
// Enable EOF in Prague tests.
346-
cfg.spec = if spec_name == SpecName::Prague {
347-
SpecId::OSAKA
348-
} else {
349-
spec_name.to_spec_id()
350-
};
345+
cfg.spec = spec_name.to_spec_id();
351346

352347
if cfg.spec.is_enabled_in(SpecId::MERGE) && block.prevrandao.is_none() {
353348
// If spec is merge and prevrandao is not set, set it to default

0 commit comments

Comments
 (0)