Skip to content

Commit

Permalink
chore: update noop.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
royvardhan committed Aug 7, 2024
1 parent 6b42ede commit 98e5261
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/blockchain-tree/src/noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use reth_primitives::{
use reth_provider::{
BlockchainTreePendingStateProvider, CanonStateNotificationSender, CanonStateNotifications,
CanonStateSubscriptions, ForkChoiceNotifications, ForkChoiceSubscriptions,
FullExecutionDataProvider,
FullExecutionDataProvider, ForkChoiceNotificationSender
};
use reth_storage_errors::provider::ProviderResult;
use std::collections::BTreeMap;
Expand All @@ -26,7 +26,7 @@ pub struct NoopBlockchainTree {
/// Broadcast channel for canon state changes notifications.
pub canon_state_notification_sender: Option<CanonStateNotificationSender>,
/// Broadcast channel for fork choice notifications.
pub fork_choice_notification_sender: Option<broadcast::Sender<SealedHeader>>,
pub fork_choice_notification_sender: Option<ForkChoiceNotificationSender>,
}

impl NoopBlockchainTree {
Expand Down Expand Up @@ -158,6 +158,6 @@ impl ForkChoiceSubscriptions for NoopBlockchainTree {
self.fork_choice_notification_sender
.as_ref()
.map(|sender| sender.subscribe())
.unwrap_or_else(|| broadcast::channel(1).1)
.unwrap_or_else(|| ForkChoiceNotificationSender::new(1).subscribe())
}
}

0 comments on commit 98e5261

Please sign in to comment.