Skip to content

Commit

Permalink
fix(db): total byte cost calculation (#897)
Browse files Browse the repository at this point in the history
Fix byte cost fn
  • Loading branch information
Alexandcoats authored Nov 17, 2022
1 parent 90c3a51 commit a28623d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/collections/analytics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl LedgerSizeAnalytics {
pub fn total_byte_cost(&self, protocol_params: &ProtocolParameters) -> d128 {
let rent_structure = protocol_params.rent_structure;
d128::from(rent_structure.v_byte_cost)
* ((self.total_data_bytes * d128::from(rent_structure.v_byte_factor_data as u32))
* ((self.total_key_bytes * d128::from(rent_structure.v_byte_factor_key as u32))
+ (self.total_data_bytes * d128::from(rent_structure.v_byte_factor_data as u32)))
}
}
Expand Down

0 comments on commit a28623d

Please sign in to comment.