Skip to content

Commit

Permalink
Use saturating_mul in fee() calculation (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
notlesh committed Nov 7, 2022
1 parent d859dd9 commit 0036e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/executor/stack/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet>
/// Get fee needed for the current executor, given the price.
pub fn fee(&self, price: U256) -> U256 {
let used_gas = self.used_gas();
U256::from(used_gas) * price
U256::from(used_gas).saturating_mul(price)
}

/// Get account nonce.
Expand Down

0 comments on commit 0036e1e

Please sign in to comment.