From cff2137d8dfdde30dfcea40c378fbcb66f51cd88 Mon Sep 17 00:00:00 2001 From: Kirill Ivanov Date: Tue, 17 Dec 2024 22:37:22 +0900 Subject: [PATCH] consistency is the key --- stats/stats/src/charts/counters/total_operational_txns.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stats/stats/src/charts/counters/total_operational_txns.rs b/stats/stats/src/charts/counters/total_operational_txns.rs index edbc2a2af..1ea806acb 100644 --- a/stats/stats/src/charts/counters/total_operational_txns.rs +++ b/stats/stats/src/charts/counters/total_operational_txns.rs @@ -54,11 +54,7 @@ impl MapFunction for Calculate { let date = total_blocks_data.timespan; let value = total_txns_data .value - .checked_sub(total_blocks_data.value) - .ok_or(ChartError::Internal(format!( - "overflow calculating {}", - Properties::name() - )))?; + .saturating_sub(total_blocks_data.value); Ok(TimespanValue { timespan: date, value: value.to_string(),