Skip to content

Commit 364dbdf

Browse files
committed
Disable notifier logging from dummy eth1 backend (#2680)
1 parent 45d89f0 commit 364dbdf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

beacon_node/beacon_chain/src/eth1_chain.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ where
223223
}
224224
}
225225

226+
/// Returns `true` if the "dummy" backend is being used.
227+
pub fn is_dummy_backend(&self) -> bool {
228+
self.use_dummy_backend
229+
}
230+
226231
/// Returns the `Eth1Data` that should be included in a block being produced for the given
227232
/// `state`.
228233
pub fn eth1_data_for_block_production(

beacon_node/client/src/notifier.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ fn eth1_logging<T: BeaconChainTypes>(beacon_chain: &BeaconChain<T>, log: &Logger
302302
if let Ok(head_info) = beacon_chain.head_info() {
303303
// Perform some logging about the eth1 chain
304304
if let Some(eth1_chain) = beacon_chain.eth1_chain.as_ref() {
305+
// No need to do logging if using the dummy backend.
306+
if eth1_chain.is_dummy_backend() {
307+
return;
308+
}
309+
305310
if let Some(status) =
306311
eth1_chain.sync_status(head_info.genesis_time, current_slot_opt, &beacon_chain.spec)
307312
{

0 commit comments

Comments
 (0)