diff --git a/crates/chain-state/src/in_memory.rs b/crates/chain-state/src/in_memory.rs index c2e1f96a8..e48434462 100644 --- a/crates/chain-state/src/in_memory.rs +++ b/crates/chain-state/src/in_memory.rs @@ -169,12 +169,11 @@ impl CanonicalInMemoryState { ) -> Self { let in_memory_state = InMemoryState::new(blocks, numbers, pending); let head_state = in_memory_state.head_state(); - let header = match head_state { - Some(state) => state.block().block().header.clone(), - None => SealedHeader::default(), - }; + let header = + head_state.map(|state| state.block().block().header.clone()).unwrap_or_default(); + let chain_info_tracker = ChainInfoTracker::new(header, finalized); - let (canon_state_notification_sender, _canon_state_notification_receiver) = + let (canon_state_notification_sender, _) = broadcast::channel(CANON_STATE_NOTIFICATION_CHANNEL_SIZE); let inner = CanonicalInMemoryStateInner { @@ -196,7 +195,7 @@ impl CanonicalInMemoryState { pub fn with_head(head: SealedHeader, finalized: Option) -> Self { let chain_info_tracker = ChainInfoTracker::new(head, finalized); let in_memory_state = InMemoryState::default(); - let (canon_state_notification_sender, _canon_state_notification_receiver) = + let (canon_state_notification_sender, _) = broadcast::channel(CANON_STATE_NOTIFICATION_CHANNEL_SIZE); let inner = CanonicalInMemoryStateInner { chain_info_tracker, diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index 60e5485ec..1084d11c4 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -37,7 +37,7 @@ use tracing::trace; /// 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)] +#[derive(Debug)] pub struct BlockchainProvider2 { /// Provider type used to access the database. database: ProviderFactory,