Skip to content

Commit

Permalink
fix: skip skipping of empty auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
royvardhan committed Sep 18, 2024
1 parent f643648 commit 0c962fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ jobs:
with:
config: ./Typos.toml
isolated: true

3 changes: 1 addition & 2 deletions bins/revme/src/cmd/statetest/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ pub struct TransactionParts {

#[serde(default)]
pub access_lists: Vec<Option<AccessList>>,
#[serde(default)]
pub authorization_list: Vec<TestAuthorization>,
pub authorization_list: Option<Vec<TestAuthorization>>,
#[serde(default)]
pub blob_versioned_hashes: Vec<B256>,
pub max_fee_per_blob_gas: Option<U256>,
Expand Down
15 changes: 7 additions & 8 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,15 @@ pub fn execute_test_suite(
.cloned()
.unwrap_or_default();

if unit.transaction.authorization_list.is_empty() {
continue;
}
env.tx.authorization_list = Some(AuthorizationList::Recovered(
env.tx.authorization_list =
unit.transaction
.authorization_list
.iter()
.map(|auth| auth.into_recovered())
.collect(),
));
.as_ref()
.map(|auth_list| {
AuthorizationList::Recovered(
auth_list.iter().map(|auth| auth.into_recovered()).collect(),
)
});

let to = match unit.transaction.to {
Some(add) => TxKind::Call(add),
Expand Down

0 comments on commit 0c962fd

Please sign in to comment.