chore: update revm and alloy primitives (#11235)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
Matthias Seitz
2024-09-26 16:33:29 +02:00
committed by GitHub
parent 3a255a1cab
commit 6a7d8938c7
53 changed files with 254 additions and 230 deletions

View File

@ -1,5 +1,8 @@
use crate::{DatabaseHashedCursorFactory, DatabaseTrieCursorFactory};
use alloy_primitives::{Address, B256};
use alloy_primitives::{
map::{HashMap, HashSet},
Address, B256,
};
use reth_db_api::transaction::DbTx;
use reth_execution_errors::StateProofError;
use reth_trie::{
@ -7,7 +10,6 @@ use reth_trie::{
trie_cursor::InMemoryTrieCursorFactory, MultiProof, TrieInput,
};
use reth_trie_common::AccountProof;
use std::collections::{HashMap, HashSet};
/// Extends [`Proof`] with operations specific for working with a database transaction.
pub trait DatabaseProof<'a, TX> {

View File

@ -267,12 +267,11 @@ impl<TX: DbTx> DatabaseHashedPostState<TX> for HashedPostState {
#[cfg(test)]
mod tests {
use super::*;
use alloy_primitives::Address;
use alloy_primitives::{map::HashMap, Address};
use reth_db::test_utils::create_test_rw_db;
use reth_db_api::database::Database;
use reth_primitives::{hex, revm_primitives::AccountInfo, U256};
use revm::db::BundleState;
use std::collections::HashMap;
#[test]
fn from_bundle_state_with_rayon() {
@ -287,8 +286,8 @@ mod tests {
let bundle_state = BundleState::builder(2..=2)
.state_present_account_info(address1, account1)
.state_present_account_info(address2, account2)
.state_storage(address1, HashMap::from([(slot1, (U256::ZERO, U256::from(10)))]))
.state_storage(address2, HashMap::from([(slot2, (U256::ZERO, U256::from(20)))]))
.state_storage(address1, HashMap::from_iter([(slot1, (U256::ZERO, U256::from(10)))]))
.state_storage(address2, HashMap::from_iter([(slot2, (U256::ZERO, U256::from(20)))]))
.build();
assert_eq!(bundle_state.reverts.len(), 1);

View File

@ -1,12 +1,11 @@
use crate::{DatabaseHashedCursorFactory, DatabaseTrieCursorFactory};
use alloy_primitives::{Bytes, B256};
use alloy_primitives::{map::HashMap, Bytes, B256};
use reth_db_api::transaction::DbTx;
use reth_execution_errors::TrieWitnessError;
use reth_trie::{
hashed_cursor::HashedPostStateCursorFactory, trie_cursor::InMemoryTrieCursorFactory,
witness::TrieWitness, HashedPostState, TrieInput,
};
use std::collections::HashMap;
/// Extends [`TrieWitness`] with operations specific for working with a database transaction.
pub trait DatabaseTrieWitness<'a, TX> {