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 804260f commit 843da5d
Show file tree
Hide file tree
Showing 3 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 = 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
2 changes: 1 addition & 1 deletion crates/blockifier/src/concurrency/worker_logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<'a, S: StateReader> WorkerExecutor<'a, S> {
fn execute_tx(&self, tx_index: TxIndex) {
let mut tx_versioned_state = self.state.pin_version(tx_index);
let tx = &self.chunk[tx_index];
let tx_charge_fee = tx.create_tx_info().enforce_fee(); //aviv: todo: msg -> CONST?
let tx_charge_fee = tx.create_tx_info().enforce_fee(); //aviv: new
let mut transactional_state =
TransactionalState::create_transactional(&mut tx_versioned_state);
let execution_flags =
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/entry_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl EntryPointExecutionContext {
};

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

Expand Down

0 comments on commit 843da5d

Please sign in to comment.