Skip to content

Commit

Permalink
Impl Debug for BlockchainProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Dec 11, 2024
1 parent e6d28e4 commit 3e90824
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/storage/provider/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,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>,
Expand Down Expand Up @@ -964,3 +963,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()
}
}

0 comments on commit 3e90824

Please sign in to comment.