Skip to content

Commit

Permalink
do not log in exex
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Jun 17, 2024
1 parent b6aa76a commit 86b760f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions examples/exex/remote/bin/exex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use futures::TryFutureExt;
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
use reth_node_api::FullNodeComponents;
use reth_node_ethereum::EthereumNode;
use reth_tracing::tracing::info;
use tokio::sync::{broadcast, mpsc};
use tokio_stream::wrappers::ReceiverStream;
use tonic::{transport::Server, Request, Response, Status};
Expand Down Expand Up @@ -49,23 +48,11 @@ async fn exex<Node: FullNodeComponents>(
notifications: Arc<broadcast::Sender<ExExNotification>>,
) -> eyre::Result<()> {
while let Some(notification) = ctx.notifications.recv().await {
match &notification {
ExExNotification::ChainCommitted { new } => {
info!(committed_chain = ?new.range(), "Received commit");
}
ExExNotification::ChainReorged { old, new } => {
info!(from_chain = ?old.range(), to_chain = ?new.range(), "Received reorg");
}
ExExNotification::ChainReverted { old } => {
info!(reverted_chain = ?old.range(), "Received revert");
}
};
let _ = notifications.send(notification);

if let Some(committed_chain) = notification.committed_chain() {
ctx.events.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
}

let _ = notifications.send(notification);
}

Ok(())
Expand Down

0 comments on commit 86b760f

Please sign in to comment.