Skip to content

Commit d66cd0f

Browse files
authored
Merge pull request oasisprotocol#2395 from oasisprotocol/peternose/trivial/fix-nonce-comment
runtime-sdk: Fix nonce comment during tx check
2 parents acb753e + 64ec291 commit d66cd0f

File tree

1 file changed

+2
-3
lines changed
  • runtime-sdk/src/modules/accounts

1 file changed

+2
-3
lines changed

runtime-sdk/src/modules/accounts/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -962,9 +962,8 @@ impl module::TransactionHandler for Module {
962962
<C::Runtime as Runtime>::Core::set_priority(gas_price.try_into().unwrap_or(u64::MAX));
963963
}
964964

965-
// Do not update nonces early during transaction checks. In case of checks, only do it after
966-
// all the other checks have already passed as otherwise retrying the transaction will not
967-
// be possible.
965+
// Do not update nonces during transaction checks. This allows validating multiple
966+
// transactions in a batch without ordering them by nonce.
968967
if !CurrentState::with_env(|env| env.is_check_only()) {
969968
Self::update_signer_nonces(ctx, &tx.auth_info)?;
970969
}

0 commit comments

Comments
 (0)