From 3643ba5e990281c716b8abc392a5d85c1e578070 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 31 Mar 2021 17:59:38 +1100 Subject: [PATCH] Add log for new RPC block --- .../src/beacon_processor/worker/sync_methods.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/beacon_node/network/src/beacon_processor/worker/sync_methods.rs b/beacon_node/network/src/beacon_processor/worker/sync_methods.rs index 4eb8be09a5d..aadc316b028 100644 --- a/beacon_node/network/src/beacon_processor/worker/sync_methods.rs +++ b/beacon_node/network/src/beacon_processor/worker/sync_methods.rs @@ -28,10 +28,20 @@ impl Worker { block: SignedBeaconBlock, result_tx: BlockResultSender, ) { + let slot = block.slot(); let block_result = self.chain.process_block(block); metrics::inc_counter(&metrics::BEACON_PROCESSOR_RPC_BLOCK_IMPORTED_TOTAL); + if let Ok(root) = &block_result { + info!( + self.log, + "New RPC block received", + "slot" => slot, + "hash" => %root + ); + } + if result_tx.send(block_result).is_err() { crit!(self.log, "Failed return sync block result"); }