Skip to content

Commit

Permalink
chore(blockifier): cleanup use of enforce_fee() by AccountTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
avivg-starkware committed Nov 17, 2024
1 parent f0436f8 commit 32d4bbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/blockifier/stateful_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<S: StateReader> StatefulValidator<S> {
let mut execution_resources = ExecutionResources::default();
let tx_context = Arc::new(self.tx_executor.block_context.to_tx_context(tx));

let limit_steps_by_resources = tx.create_tx_info().enforce_fee();
let limit_steps_by_resources = tx.enforce_fee();
let validate_call_info = tx.validate_tx(
self.tx_executor.block_state.as_mut().expect(BLOCK_STATE_ACCESS_ERR),
&mut execution_resources,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn test_fee_enforcement(
&mut NonceManager::default(),
);

let enforce_fee = deploy_account_tx.create_tx_info().enforce_fee();
let enforce_fee = deploy_account_tx.enforce_fee();
assert_ne!(zero_bounds, enforce_fee);
let result = deploy_account_tx.execute(state, &block_context, enforce_fee, true);
// Execution should fail if the fee is enforced because the account doesn't have sufficient
Expand All @@ -238,7 +238,7 @@ fn test_all_bounds_combinations_enforce_fee(
DEFAULT_STRK_L1_DATA_GAS_PRICE.into(),
),
});
assert_eq!(account_tx.create_tx_info().enforce_fee(), expected_enforce_fee);
assert_eq!(account_tx.enforce_fee(), expected_enforce_fee);
}

#[rstest]
Expand Down

0 comments on commit 32d4bbf

Please sign in to comment.