async fn test_initial_estimate(
    state_override: StateOverride,
    tx: L2Tx,
    initial_pivot_multiplier: f64,
) -> TransactionExecutionMetrics {
    let pool = ConnectionPool::<Core>::constrained_test_pool(1).await;
    let tx_sender = create_real_tx_sender(pool).await;
    let block_args = pending_block_args(&tx_sender).await;
    let mut estimator = GasEstimator::new(&tx_sender, tx.into(), block_args, Some(state_override))
        .await
        .unwrap();
    estimator.adjust_transaction_fee();
    let initial_estimate = estimator.initialize().await.unwrap();

    let lower_bound = initial_estimate.lower_gas_bound_without_overhead().unwrap()
        + initial_estimate.operator_overhead;
    let (vm_result, _) = estimator.unadjusted_step(lower_bound).await.unwrap();
    assert!(vm_result.is_failed(), "{vm_result:?}");

    // A slightly larger limit should work.
    let initial_pivot =
        (initial_estimate.total_gas_charged.unwrap() as f64 * initial_pivot_multiplier) as u64;
    let (vm_result, metrics) = estimator.unadjusted_step(initial_pivot).await.unwrap();
    assert!(!vm_result.is_failed(), "{vm_result:?}");
    metrics
}
Tests the lower bound and initial pivot extracted from the initial estimate (one with effectively infinite gas amount).
Returns the VM result for a VM run with the initial pivot.
core/node/api_server/src/tx_sender/tests/gas_estimation.rs