chore: remove revm/compat from reth-primitives (#8960)

This commit is contained in:
joshieDo
2024-06-19 18:42:54 +02:00
committed by GitHub
parent a21a2b72eb
commit b5b15f03a0
10 changed files with 54 additions and 75 deletions

View File

@ -1,7 +1,7 @@
#![allow(missing_docs, unreachable_pub)]
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use proptest::{prelude::*, strategy::ValueTree, test_runner::TestRunner};
use reth_primitives::{keccak256, revm::compat::into_reth_acc, Address, B256, U256};
use reth_primitives::{keccak256, Address, B256, U256};
use reth_trie::{HashedPostState, HashedStorage};
use revm::db::{states::BundleBuilder, BundleAccount};
use std::collections::HashMap;
@ -30,7 +30,7 @@ fn from_bundle_state_seq(state: &HashMap<Address, BundleAccount>) -> HashedPostS
for (address, account) in state {
let hashed_address = keccak256(address);
this.accounts.insert(hashed_address, account.info.clone().map(into_reth_acc));
this.accounts.insert(hashed_address, account.info.clone().map(Into::into));
let hashed_storage = HashedStorage::from_iter(
account.status.was_destroyed(),

View File

@ -12,9 +12,7 @@ use reth_db_api::{
transaction::DbTx,
};
use reth_execution_errors::StateRootError;
use reth_primitives::{
keccak256, revm::compat::into_reth_acc, Account, Address, BlockNumber, B256, U256,
};
use reth_primitives::{keccak256, Account, Address, BlockNumber, B256, U256};
use revm::db::BundleAccount;
use std::{
collections::{hash_map, HashMap, HashSet},
@ -41,7 +39,7 @@ impl HashedPostState {
.into_par_iter()
.map(|(address, account)| {
let hashed_address = keccak256(address);
let hashed_account = account.info.clone().map(into_reth_acc);
let hashed_account = account.info.clone().map(Into::into);
let hashed_storage = HashedStorage::from_iter(
account.status.was_destroyed(),
account.storage.iter().map(|(key, value)| {