Skip to main content

check_gas_bounds

Function check_gas_bounds 

Source
pub fn check_gas_bounds(
    config: &ProtocolConfig,
    reference_gas_price: u64,
    gas_price: u64,
    gas_budget: u64,
) -> UserInputResult<()>
Expand description

Validates the transaction’s declared gas price and budget against the epoch reference gas price and the protocol config bounds.

Payload-only: reads no objects and no frontier state, so it is safe to run post-consensus before version assignment. Shares the price checks with IotaGasStatus::new and the budget-bound checks with IotaGasStatusV1::check_gas_balance, without touching gas coins.