mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 03:27:58 +00:00
Replace system config Index for Nonce (#14290)
* replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * wip * remove index in lieu of nonce * wip * remove accountnonce in lieu of nonce * add minor improvement * rebase and merge conflicts
This commit is contained in:
@@ -37,11 +37,11 @@ use sp_std::vec;
|
||||
/// some kind of priority upon validating transactions.
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
|
||||
#[scale_info(skip_type_params(T))]
|
||||
pub struct CheckNonce<T: Config>(#[codec(compact)] pub T::Index);
|
||||
pub struct CheckNonce<T: Config>(#[codec(compact)] pub T::Nonce);
|
||||
|
||||
impl<T: Config> CheckNonce<T> {
|
||||
/// utility constructor. Used only in client/factory code.
|
||||
pub fn from(nonce: T::Index) -> Self {
|
||||
pub fn from(nonce: T::Nonce) -> Self {
|
||||
Self(nonce)
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ where
|
||||
}
|
||||
.into())
|
||||
}
|
||||
account.nonce += T::Index::one();
|
||||
account.nonce += T::Nonce::one();
|
||||
crate::Account::<T>::insert(who, account);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user