From 5b19badd9b652d9ebf53826954e488436e983753 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 11 Dec 2024 14:44:18 -0500 Subject: [PATCH] feat(op-isthmus): impl `Debug` for `BlockchainProvider` (#13312) --- crates/storage/provider/src/providers/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/storage/provider/src/providers/mod.rs b/crates/storage/provider/src/providers/mod.rs index d02c59278666..9e9e1d16fe0e 100644 --- a/crates/storage/provider/src/providers/mod.rs +++ b/crates/storage/provider/src/providers/mod.rs @@ -1,3 +1,5 @@ +use core::fmt; + use crate::{ AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource, BlockchainTreePendingStateProvider, CanonStateNotifications, @@ -124,7 +126,6 @@ impl 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 { /// Provider type used to access the database. database: ProviderFactory, @@ -964,3 +965,9 @@ impl AccountReader for BlockchainProvider { self.database.provider()?.basic_account(address) } } + +impl fmt::Debug for BlockchainProvider { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("BlockchainProvider").finish_non_exhaustive() + } +}