mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: update revm and alloy primitives (#11235)
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
@ -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> {
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user