Skip to content

Commit

Permalink
Add log for new RPC block
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Mar 31, 2021
1 parent 1af6c50 commit 3643ba5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions beacon_node/network/src/beacon_processor/worker/sync_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ impl<T: BeaconChainTypes> Worker<T> {
block: SignedBeaconBlock<T::EthSpec>,
result_tx: BlockResultSender<T::EthSpec>,
) {
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");
}
Expand Down

0 comments on commit 3643ba5

Please sign in to comment.