Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blockifier): typo in infinite_gas_for_vm_mode #2704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/contract_address_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn test_calculate_contract_address() {
calldata,
entry_point_selector: selector_from_name("test_contract_address"),
storage_address: deployer_address,
initial_gas: versioned_constants.inifite_gas_for_vm_mode(),
initial_gas: versioned_constants.infinite_gas_for_vm_mode(),
..Default::default()
};
let contract_address =
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/entry_point_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn run_security_test(
entry_point_selector: selector_from_name(entry_point_name),
calldata,
storage_address: security_contract.get_instance_address(0),
initial_gas: versioned_constants.inifite_gas_for_vm_mode(),
initial_gas: versioned_constants.infinite_gas_for_vm_mode(),
..Default::default()
};
let error = match entry_point_call.execute_directly(state) {
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/execution_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn execute_entry_point_call_wrapper(
);
if current_tracked_resource == TrackedResource::CairoSteps {
// Override the initial gas with a high value so it won't limit the run.
call.initial_gas = context.versioned_constants().inifite_gas_for_vm_mode();
call.initial_gas = context.versioned_constants().infinite_gas_for_vm_mode();
}
let orig_call = call.clone();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ fn test_initial_gas(
);
assert_eq!(
curr_initial_gas,
block_context.versioned_constants.inifite_gas_for_vm_mode()
block_context.versioned_constants.infinite_gas_for_vm_mode()
);
started_vm_mode = true;
}
Expand Down
8 changes: 4 additions & 4 deletions crates/blockifier/src/transaction/transactions_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ static VERSIONED_CONSTANTS: LazyLock<VersionedConstants> =
LazyLock::new(VersionedConstants::create_for_testing);

#[fixture]
fn inifite_gas_for_vm_mode() -> u64 {
VERSIONED_CONSTANTS.inifite_gas_for_vm_mode()
fn infinite_gas_for_vm_mode() -> u64 {
VERSIONED_CONSTANTS.infinite_gas_for_vm_mode()
}

#[fixture]
Expand Down Expand Up @@ -547,7 +547,7 @@ fn test_invoke_tx(
let expected_execute_call = CallEntryPoint {
entry_point_selector: selector_from_name(constants::EXECUTE_ENTRY_POINT_NAME),
initial_gas: match account_cairo_version {
CairoVersion::Cairo0 => versioned_constants.inifite_gas_for_vm_mode(),
CairoVersion::Cairo0 => versioned_constants.infinite_gas_for_vm_mode(),
CairoVersion::Cairo1(_) => expected_initial_execution_gas,
},
..expected_validated_call
Expand Down Expand Up @@ -580,7 +580,7 @@ fn test_invoke_tx(
storage_address: test_contract_address,
caller_address: sender_address,
call_type: CallType::Call,
initial_gas: versioned_constants.inifite_gas_for_vm_mode(),
initial_gas: versioned_constants.infinite_gas_for_vm_mode(),
};

let expected_return_result_retdata = Retdata(expected_return_result_calldata);
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl VersionedConstants {
}

/// Returns the default initial gas for VM mode transactions.
pub fn inifite_gas_for_vm_mode(&self) -> u64 {
pub fn infinite_gas_for_vm_mode(&self) -> u64 {
self.os_constants.gas_costs.base.default_initial_gas_cost
}

Expand Down
Loading