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:
Juan
2023-07-14 08:56:48 +02:00
committed by GitHub
parent 0fbeb31d50
commit 6a29a70a92
132 changed files with 234 additions and 235 deletions
+5 -5
View File
@@ -53,7 +53,7 @@ use frame_system::{
EnsureRoot, EnsureRootWithSuccess, EnsureSigned, EnsureSignedBy, EnsureWithSuccess,
};
pub use node_primitives::{AccountId, Signature};
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Moment, Nonce};
use pallet_asset_conversion::{NativeOrAssetId, NativeOrAssetIdConverter};
#[cfg(feature = "runtime-benchmarks")]
use pallet_contracts::NoopMigration;
@@ -226,7 +226,7 @@ impl frame_system::Config for Runtime {
type DbWeight = RocksDbWeight;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Index;
type Nonce = Nonce;
type Hash = Hash;
type Hashing = BlakeTwo256;
type AccountId = AccountId;
@@ -1279,7 +1279,7 @@ where
call: RuntimeCall,
public: <Signature as traits::Verify>::Signer,
account: AccountId,
nonce: Index,
nonce: Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as traits::Extrinsic>::SignaturePayload)> {
let tip = 0;
// take the biggest period possible.
@@ -2254,8 +2254,8 @@ impl_runtime_apis! {
}
}
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(account: AccountId) -> Index {
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}