File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
crates/starknet_batcher/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ const MAX_BLOCK_SIZE: u64 = 4000000000; // In gas units. It's equivalent to 40M
15
15
/// Calculate the base gas price for the next block according to EIP-1559.
16
16
///
17
17
/// # Parameters
18
- /// - `price`: The base gas price of the current block.
18
+ /// - `price`: The base gas price per unit (in fri) of the current block.
19
19
/// - `gas_used`: The total gas used in the current block.
20
- /// - `gas_target`: The target gas usage per block (usually half of the gas limit).
20
+ /// - `gas_target`: The target gas usage per block (usually half of a block's gas limit).
21
21
pub fn calculate_next_base_gas_price ( price : u64 , gas_used : u64 , gas_target : u64 ) -> u64 {
22
22
// Setting the target at 50% of the max block size balances the rate of gas price changes,
23
23
// helping to prevent sudden spikes, particularly during increases, for a better user
You can’t perform that action at this time.
0 commit comments