metrics should .set - not .add (#2)

This commit is contained in:
Groovie | Mango 2023-11-25 09:49:12 +01:00 committed by GitHub
parent d620765380
commit 86bc0e4e6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 {