From 86bc0e4e6a5fb8e820487cb331c3954cee30bdc6 Mon Sep 17 00:00:00 2001 From: Groovie | Mango <95291500+grooviegermanikus@users.noreply.github.com> Date: Sat, 25 Nov 2023 09:49:12 +0100 Subject: [PATCH] metrics should .set - not .add (#2) --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 83f2998..759ac40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -110,7 +110,7 @@ async fn main() { let block_info = BlockInfo::new(&block); TXERROR_COUNT - .add(block_info.processed_transactions - block_info.successful_transactions); + .set(block_info.processed_transactions - block_info.successful_transactions); if let Err(e) = postgres.save_block_info(block_info).await { error!("Error saving block {}", e); } @@ -177,7 +177,7 @@ async fn main() { BlockInfo::new_from_rpc_block(slot, &block, banking_stage_error_count); if let Some(block_info) = block_info { BANKING_STAGE_ERROR_COUNT.add(banking_stage_error_count); - TXERROR_COUNT.add( + TXERROR_COUNT.set( block_info.processed_transactions - block_info.successful_transactions, ); if let Err(e) = postgres.save_block_info(block_info).await {