feat(op-isthmus): impl Debug for BlockchainProvider (#13312)

This commit is contained in:
Emilia Hane
2024-12-11 14:44:18 -05:00
committed by GitHub
parent 941ffb51fa
commit 5b19badd9b

View File

@ -1,3 +1,5 @@
use core::fmt;
use crate::{
AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt,
BlockSource, BlockchainTreePendingStateProvider, CanonStateNotifications,
@ -124,7 +126,6 @@ impl<T> TreeNodeTypes for T where T: ProviderNodeTypes + NodeTypesForTree {}
/// This type serves as the main entry point for interacting with the blockchain and provides data
/// from database storage and from the blockchain tree (pending state etc.) It is a simple wrapper
/// type that holds an instance of the database and the blockchain tree.
#[allow(missing_debug_implementations)]
pub struct BlockchainProvider<N: NodeTypesWithDB> {
/// Provider type used to access the database.
database: ProviderFactory<N>,
@ -964,3 +965,9 @@ impl<N: ProviderNodeTypes> AccountReader for BlockchainProvider<N> {
self.database.provider()?.basic_account(address)
}
}
impl<N: NodeTypesWithDB> fmt::Debug for BlockchainProvider<N> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("BlockchainProvider").finish_non_exhaustive()
}
}