fix: set stage progress metric to absolute value (#593)

This commit is contained in:
Bjerg
2022-12-23 18:14:53 +01:00
committed by GitHub
parent 562e895f21
commit f8d1521c50

View File

@@ -1,4 +1,4 @@
use metrics::counter;
use metrics::absolute_counter;
use reth_db::{
tables::SyncStage,
transaction::{DbTx, DbTxMut},
@@ -31,7 +31,7 @@ impl StageId {
tx: &impl DbTxMut<'db>,
block: BlockNumber,
) -> Result<(), DbError> {
counter!("stage.progress", block, "stage" => self.0);
absolute_counter!("stage.progress", block, "stage" => self.0);
tx.put::<SyncStage>(self.0.as_bytes().to_vec(), block)
}
}