Skip to content

Commit

Permalink
Use OpPrimitives in test
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Nov 19, 2024
1 parent c93fb43 commit 0fe0050
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/optimism/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ reth-primitives = { workspace = true, features = ["test-utils"] }
reth-optimism-chainspec.workspace = true
alloy-genesis.workspace = true
alloy-consensus.workspace = true
reth-optimism-primitives.workspace = true

[features]
default = ["std"]
Expand Down
4 changes: 3 additions & 1 deletion crates/optimism/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ mod tests {
AccountRevertInit, BundleStateInit, Chain, ExecutionOutcome, RevertsInit,
};
use reth_optimism_chainspec::BASE_MAINNET;
use reth_optimism_primitives::OpPrimitives;
use reth_primitives::{Account, Log, Receipt, Receipts, SealedBlockWithSenders, TxType};

use reth_revm::{
Expand Down Expand Up @@ -602,7 +603,8 @@ mod tests {

// Create a Chain object with a BTreeMap of blocks mapped to their block numbers,
// including block1_hash and block2_hash, and the execution_outcome
let chain: Chain = Chain::new([block1, block2], execution_outcome.clone(), None);
let chain: Chain<OpPrimitives> =
Chain::new([block1, block2], execution_outcome.clone(), None);

// Assert that the proper receipt vector is returned for block1_hash
assert_eq!(chain.receipts_by_block_hash(block1_hash), Some(vec![&receipt1]));
Expand Down

0 comments on commit 0fe0050

Please sign in to comment.