Skip to content

Commit 42210a8

Browse files
committed
wip checks
1 parent 0e4d872 commit 42210a8

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/checks/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
pub mod block;
22
pub mod epoch;
33

4-
5-
64
use block::BlockHeigtCheck;
75
use epoch::EpochCheck;
86

9-
use crate::state::State;
107

118
pub enum Checks {
129
BlockHeightCheck(BlockHeigtCheck),
@@ -16,6 +13,6 @@ pub enum Checks {
1613
pub fn all_checks() -> Vec<Checks> {
1714
vec![
1815
Checks::BlockHeightCheck(BlockHeigtCheck::default()),
19-
Checks::EpochCheck(EpochCheck::default())
16+
Checks::EpochCheck(EpochCheck::default()),
2017
]
21-
}
18+
}

src/shared/namada.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl Block {
171171
pub fn from(response: Response, checksums: &Checksums, epoch: Epoch) -> Self {
172172
Self {
173173
height: response.block.header.height.value(),
174-
epoch: epoch,
174+
epoch,
175175
timestamp: response.block.header.time.unix_timestamp(),
176176
transactions: response
177177
.block

src/state.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use std::{collections::HashMap, num::NonZeroUsize};
1+
use std::num::NonZeroUsize;
22

33
use lru::LruCache;
44
use prometheus_exporter::prometheus::{
5-
core::{AtomicF64, AtomicU64, GenericCounter, GenericGauge},
6-
register_counter, register_counter_with_registry, register_gauge, Counter, Opts, Registry,
5+
core::{AtomicU64, GenericCounter},
6+
Registry,
77
};
88

99
use crate::shared::{
@@ -50,8 +50,8 @@ impl PrometheusMetrics {
5050
registry.register(Box::new(epoch_counter.clone())).unwrap();
5151

5252
Self {
53-
block_height_counter: block_height_counter,
54-
epoch_counter: epoch_counter,
53+
block_height_counter,
54+
epoch_counter,
5555
registry,
5656
}
5757
}

0 commit comments

Comments
 (0)