feat(execution-types): add account_state helper to BlockExecutionOutput (#22177)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Georgios Konstantopoulos
2026-02-14 03:08:05 -08:00
committed by GitHub
parent 2c443a3dcb
commit d3088e171c

View File

@@ -1,6 +1,6 @@
use alloy_primitives::{Address, B256, U256};
use reth_primitives_traits::{Account, Bytecode};
use revm::database::BundleState;
use revm::database::{states::BundleState, BundleAccount};
pub use alloy_evm::block::BlockExecutionResult;
@@ -37,6 +37,11 @@ impl<T> BlockExecutionOutput<T> {
self.state.account(address).map(|a| a.info.as_ref().map(Into::into))
}
/// Returns the state [`BundleAccount`] for the given address.
pub fn account_state(&self, address: &Address) -> Option<&BundleAccount> {
self.state.account(address)
}
/// Get storage if value is known.
///
/// This means that depending on status we can potentially return `U256::ZERO`.