Skip to content

Commit

Permalink
consistency is the key
Browse files Browse the repository at this point in the history
  • Loading branch information
bragov4ik committed Dec 18, 2024
1 parent 3e9b935 commit e0581b1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions stats/stats/src/charts/counters/total_operational_txns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
DataSource,
},
types::TimespanValue,
ChartProperties, MissingDatePolicy, Named, UpdateError,
ChartProperties, MissingDatePolicy, Named,
};

use chrono::NaiveDate;
Expand Down Expand Up @@ -54,11 +54,7 @@ impl MapFunction<Input> for Calculate {
let date = total_blocks_data.timespan;
let value = total_txns_data
.value
.checked_sub(total_blocks_data.value)
.ok_or(UpdateError::Internal(format!(
"overflow calculating {}",
Properties::name()
)))?;
.saturating_sub(total_blocks_data.value);
Ok(TimespanValue {
timespan: date,
value: value.to_string(),
Expand Down

0 comments on commit e0581b1

Please sign in to comment.