Skip to content

Commit

Permalink
Update src/utils.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Dustin Brickwood <[email protected]>
  • Loading branch information
MexicanAce and dutterbutter authored Aug 10, 2023
1 parent 9b56216 commit f5cd4b5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ pub fn derive_gas_estimation_overhead(
.max()
.unwrap()
}

/// Calculates the total gas cost of the block overhead, including the gas cost of the public data.
///
/// # Arguments
///
/// * `gas_per_pubdata_byte` - The gas cost per byte of public data.
///
/// # Returns
///
/// The total gas cost of the block overhead, including the gas cost of the public data.
pub fn block_overhead_gas(gas_per_pubdata_byte: u32) -> u32 {
BLOCK_OVERHEAD_GAS + BLOCK_OVERHEAD_PUBDATA * gas_per_pubdata_byte
}
Expand Down

0 comments on commit f5cd4b5

Please sign in to comment.