Skip to content

Commit

Permalink
feat(op-isthmus): impl Debug for BlockchainProvider (paradigmxyz#…
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Dec 11, 2024
1 parent 941ffb5 commit 5b19bad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/storage/provider/src/providers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::fmt;

use crate::{
AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt,
BlockSource, BlockchainTreePendingStateProvider, CanonStateNotifications,
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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()
}
}

0 comments on commit 5b19bad

Please sign in to comment.