mod builder;
pub use builder::ConcurrentStateBuilder;
mod cache;
pub use cache::ConcurrentCacheState;
mod error;
pub use error::ConcurrentStateError;
mod state;
pub use state::{Child, ConcurrentState, ConcurrentStateInfo};
use crate::db::StateAcc;
use alloy::primitives::B256;
use revm::{
database::{states::bundle_state::BundleRetention, BundleState},
DatabaseRef,
};
use std::collections::BTreeMap;
impl<Db: DatabaseRef + Sync> StateAcc for ConcurrentState<Db> {
fn set_state_clear_flag(&mut self, flag: bool) {
Self::set_state_clear_flag(self, flag)
}
fn merge_transitions(&mut self, retention: BundleRetention) {
Self::merge_transitions(self, retention)
}
fn take_bundle(&mut self) -> BundleState {
Self::take_bundle(self)
}
fn set_block_hashes(&mut self, block_hashes: &BTreeMap<u64, B256>) {
self.info.block_hashes.write().unwrap().extend(block_hashes)
}
}