Skip to content

Commit

Permalink
chore(blockifier): have limit_steps_by_resources flag represent charg…
Browse files Browse the repository at this point in the history
…e_fee flag &enforce_fee ret val
  • Loading branch information
avivg-starkware committed Sep 17, 2024
1 parent 7affb82 commit 6c9a32d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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 = true;
let limit_steps_by_resources = tx.create_tx_info().enforce_fee(); //aviv: was true;
let validate_call_info = tx.validate_tx(
self.tx_executor.block_state.as_mut().expect(BLOCK_STATE_ACCESS_ERR),
&mut execution_resources,
Expand Down
3 changes: 2 additions & 1 deletion crates/blockifier/src/execution/entry_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ impl EntryPointExecutionContext {
.expect("Failed to convert invoke_tx_max_n_steps (u32) to usize."),
};

if !limit_steps_by_resources || !tx_info.enforce_fee() {
if !limit_steps_by_resources {
// aviv: was with '|| !tx_info.enforce_fee()'
return block_upper_bound;
}

Expand Down

0 comments on commit 6c9a32d

Please sign in to comment.