mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add more eth1 metrics (#728)
* Add metrics for junk eth1 votes * Add eth1 cache metrics
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::metrics;
|
||||
use eth1::{Config as Eth1Config, Eth1Block, Service as HttpService};
|
||||
use eth2_hashing::hash;
|
||||
use exit_future::Exit;
|
||||
@@ -351,6 +352,8 @@ impl<T: EthSpec, S: Store<T>> Eth1ChainBackend<T> for CachingEth1Backend<T, S> {
|
||||
fn random_eth1_data() -> Eth1Data {
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
metrics::inc_counter(&metrics::JUNK_ETH1_VOTES);
|
||||
|
||||
macro_rules! rand_bytes {
|
||||
($num_bytes: expr) => {{
|
||||
let mut arr = [0_u8; $num_bytes];
|
||||
|
||||
Reference in New Issue
Block a user