Skip to content

Commit

Permalink
use correct nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Oct 11, 2023
1 parent 1c164fc commit cf09429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion runtime/integration-tests/src/generic/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ pub trait Env<T: Runtime> {
) -> <T::Block as Block>::Extrinsic {
self.state(|| {
let runtime_call = call.into();
let nonce = frame_system::Pallet::<T>::account(who.to_account_id()).nonce;
let signed_extra = (
frame_system::CheckNonZeroSender::<T>::new(),
frame_system::CheckSpecVersion::<T>::new(),
frame_system::CheckTxVersion::<T>::new(),
frame_system::CheckGenesis::<T>::new(),
frame_system::CheckEra::<T>::from(Era::mortal(256, 0)),
frame_system::CheckNonce::<T>::from(0),
frame_system::CheckNonce::<T>::from(nonce),
frame_system::CheckWeight::<T>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<T>::from(0),
);
Expand Down
2 changes: 0 additions & 2 deletions runtime/integration-tests/src/generic/envs/runtime_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::generic::{environment::Env, runtime::Runtime};
/// Evironment that interact directly with the runtime,
/// without the usage of a client.
pub struct RuntimeEnv<T: Runtime> {
nonce: Index,
ext: Rc<RefCell<sp_io::TestExternalities>>,
_config: PhantomData<T>,
}
Expand All @@ -42,7 +41,6 @@ impl<T: Runtime> Env<T> for RuntimeEnv<T> {
ext.execute_with(|| Self::prepare_block(1));

Self {
nonce: 0,
ext: Rc::new(RefCell::new(ext)),
_config: PhantomData,
}
Expand Down

0 comments on commit cf09429

Please sign in to comment.