Skip to content

Commit

Permalink
fix: add missing values
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Sep 5, 2024
1 parent e3693a5 commit 8c855f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion crates/blockifier/src/concurrency/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ pub fn create_fee_transfer_call_info<S: StateReader>(
) -> CallInfo {
let block_context = BlockContext::create_for_account_testing();
let mut transactional_state = TransactionalState::create_transactional(state);
let execution_flags = ExecutionFlags { charge_fee: true, validate: true, concurrency_mode };
let execution_flags =
ExecutionFlags { charge_fee: true, validate: true, concurrency_mode, nonce_check: true };
let execution_info =
account_tx.execute_raw(&mut transactional_state, &block_context, execution_flags).unwrap();

Expand Down
4 changes: 2 additions & 2 deletions crates/blockifier/src/concurrency/versioned_state_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ fn test_run_parallel_txs() {
// Execute transactions
thread::scope(|s| {
s.spawn(move || {
let result = account_tx_1.execute(&mut state_1, &block_context_1, true, true);
let result = account_tx_1.execute(&mut state_1, &block_context_1, true, true, true);
assert_eq!(result.is_err(), enforce_fee);
});
s.spawn(move || {
account_tx_2.execute(&mut state_2, &block_context_2, true, true).unwrap();
account_tx_2.execute(&mut state_2, &block_context_2, true, true, true).unwrap();

// Check that the constructor wrote ctor_arg to the storage.
let storage_key = get_storage_var_address("ctor_arg", &[]);
Expand Down
8 changes: 6 additions & 2 deletions crates/blockifier/src/concurrency/worker_logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ impl<'a, S: StateReader> WorkerExecutor<'a, S> {
let tx = &self.chunk[tx_index];
let mut transactional_state =
TransactionalState::create_transactional(&mut tx_versioned_state);
let execution_flags =
ExecutionFlags { charge_fee: true, validate: true, concurrency_mode: true };
let execution_flags = ExecutionFlags {
charge_fee: true,
validate: true,
concurrency_mode: true,
nonce_check: true,
};
let execution_result =
tx.execute_raw(&mut transactional_state, self.block_context, execution_flags);

Expand Down

0 comments on commit 8c855f2

Please sign in to comment.