Skip to content

Commit

Permalink
research: validate feature union
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Apr 30, 2024
1 parent e90298e commit ec0e401
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions crates/edr_eth2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub use revm::primitives::{SpecId, B256};
use revm::{db::EmptyDB, Evm};

pub struct TestEth<'evm> {
Expand Down
19 changes: 12 additions & 7 deletions crates/edr_multi/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
use edr_eth2::TestEth;
use edr_opt::TestOpt;

fn main() -> anyhow::Result<()> {
let mut test_opt = TestOpt::default();
let mut test_eth = TestEth::default();
let eth_hash = edr_eth2::B256::ZERO;
let opt_hash = edr_opt::B256::ZERO;

if eth_hash == opt_hash {
println!("The same hash");
}

let eth_spec_id = edr_eth2::SpecId::ECOTONE;
let opt_spec_id = edr_opt::SpecId::LATEST;

test_eth.evm.transact()?;
test_opt.evm.transact()?;
if eth_spec_id == opt_spec_id {
println!("The same spec id");
}

Ok(())
}
7 changes: 2 additions & 5 deletions crates/edr_opt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use revm::{
db::EmptyDB,
primitives::{HandlerCfg, SpecId},
Evm,
};
pub use revm::primitives::{SpecId, B256};
use revm::{db::EmptyDB, primitives::HandlerCfg, Evm};

pub struct TestOpt<'evm> {
pub evm: revm::Evm<'evm, (), EmptyDB>,
Expand Down

0 comments on commit ec0e401

Please sign in to comment.