Replace Index for Nonce (#2740)

* replace Index for Nonce

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Juan
2023-07-14 10:46:49 +02:00
committed by GitHub
parent 24d6e46ad0
commit 3513b7e019
44 changed files with 366 additions and 368 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
use std::sync::Arc;
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce};
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
use sc_client_api::AuxStore;
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
@@ -29,7 +29,7 @@ impl system::Config for Test {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = u64;
@@ -71,7 +71,7 @@ pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::Account
pub type Balance = u128;
/// Index of a transaction in the chain.
pub type Index = u32;
pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
@@ -269,7 +269,7 @@ impl frame_system::Config for Runtime {
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = AccountIdLookup<AccountId, ()>;
/// The index type for storing how many extrinsics an account has signed.
type Index = Index;
type Nonce = Nonce;
/// The type for hashing blocks and tries.
type Hash = Hash;
/// The hashing algorithm used.
@@ -599,8 +599,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)
}
}