Skip to content

Commit

Permalink
refactor(starknet_batcher): fee market documentation reshape (#2964)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeletstarkware authored Dec 26, 2024
1 parent bbe7f0b commit 29d16de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/starknet_batcher/src/fee_market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const MAX_BLOCK_SIZE: u64 = 4000000000; // In gas units. It's equivalent to 40M
/// Calculate the base gas price for the next block according to EIP-1559.
///
/// # Parameters
/// - `price`: The base gas price of the current block.
/// - `price`: The base gas price per unit (in fri) of the current block.
/// - `gas_used`: The total gas used in the current block.
/// - `gas_target`: The target gas usage per block (usually half of the gas limit).
/// - `gas_target`: The target gas usage per block (usually half of a block's gas limit).
pub fn calculate_next_base_gas_price(price: u64, gas_used: u64, gas_target: u64) -> u64 {
// Setting the target at 50% of the max block size balances the rate of gas price changes,
// helping to prevent sudden spikes, particularly during increases, for a better user
Expand Down

0 comments on commit 29d16de

Please sign in to comment.