Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/common/src/assigned_slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ mod tests {
type BlockLength = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/auctions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ mod tests {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ mod tests {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/crowdloan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ mod tests {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ mod tests {
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type RuntimeCall = RuntimeCall;
type Hash = H256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl frame_system::Config for Test {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/paras_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ mod tests {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/purchase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ mod tests {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/slots/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ mod tests {
type BlockLength = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
4 changes: 2 additions & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl frame_system::Config for Runtime {
type BlockLength = BlockLength;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Nonce;
type Nonce = Nonce;
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hashing = BlakeTwo256;
Expand Down Expand Up @@ -731,7 +731,7 @@ where
call: RuntimeCall,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Config>::Index,
nonce: <Runtime as frame_system::Config>::Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
use sp_runtime::traits::StaticLookup;
// take the biggest period possible.
Expand Down
2 changes: 1 addition & 1 deletion runtime/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl frame_system::Config for Test {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = BlockNumber;
type Hash = H256;
type Hashing = BlakeTwo256;
Expand Down
4 changes: 2 additions & 2 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl frame_system::Config for Runtime {
type BlockLength = BlockLength;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Nonce;
type Nonce = Nonce;
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hashing = BlakeTwo256;
Expand Down Expand Up @@ -782,7 +782,7 @@ where
call: RuntimeCall,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Config>::Index,
nonce: <Runtime as frame_system::Config>::Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
use sp_runtime::traits::StaticLookup;
// take the biggest period possible.
Expand Down
4 changes: 2 additions & 2 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl frame_system::Config for Runtime {
type DbWeight = RocksDbWeight;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Nonce;
type Nonce = Nonce;
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hashing = BlakeTwo256;
Expand Down Expand Up @@ -676,7 +676,7 @@ where
call: RuntimeCall,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Config>::Index,
nonce: <Runtime as frame_system::Config>::Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
use sp_runtime::traits::StaticLookup;
// take the biggest period possible.
Expand Down
4 changes: 2 additions & 2 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl frame_system::Config for Runtime {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Nonce;
type Nonce = Nonce;
type BlockNumber = BlockNumber;
type Hash = HashT;
type Hashing = BlakeTwo256;
Expand Down Expand Up @@ -385,7 +385,7 @@ where
call: RuntimeCall,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Config>::Index,
nonce: <Runtime as frame_system::Config>::Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
let period =
BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64;
Expand Down
4 changes: 2 additions & 2 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl frame_system::Config for Runtime {
type BlockLength = BlockLength;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = Nonce;
type Nonce = Nonce;
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hashing = BlakeTwo256;
Expand Down Expand Up @@ -610,7 +610,7 @@ where
call: RuntimeCall,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Config>::Index,
nonce: <Runtime as frame_system::Config>::Nonce,
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
use sp_runtime::traits::StaticLookup;
// take the biggest period possible.
Expand Down
8 changes: 4 additions & 4 deletions utils/staking-miner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ macro_rules! construct_runtime_prelude {
pub(crate) fn [<create_uxt_ $runtime>](
raw_solution: EPM::RawSolution<EPM::SolutionOf<Runtime>>,
signer: crate::signer::Signer,
nonce: crate::prelude::Index,
nonce: crate::prelude::Nonce,
tip: crate::prelude::Balance,
era: sp_runtime::generic::Era,
) -> UncheckedExtrinsic {
Expand Down Expand Up @@ -121,7 +121,7 @@ macro_rules! construct_runtime_prelude {

// NOTE: we might be able to use some code from the bridges repo here.
fn signed_ext_builder_polkadot(
nonce: Index,
nonce: Nonce,
tip: Balance,
era: sp_runtime::generic::Era,
) -> polkadot_runtime_exports::SignedExtra {
Expand All @@ -140,7 +140,7 @@ fn signed_ext_builder_polkadot(
}

fn signed_ext_builder_kusama(
nonce: Index,
nonce: Nonce,
tip: Balance,
era: sp_runtime::generic::Era,
) -> kusama_runtime_exports::SignedExtra {
Expand All @@ -158,7 +158,7 @@ fn signed_ext_builder_kusama(
}

fn signed_ext_builder_westend(
nonce: Index,
nonce: Nonce,
tip: Balance,
era: sp_runtime::generic::Era,
) -> westend_runtime_exports::SignedExtra {
Expand Down
4 changes: 2 additions & 2 deletions utils/staking-miner/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub type AccountId = core_primitives::AccountId;
pub type BlockNumber = core_primitives::BlockNumber;
/// The balance type.
pub type Balance = core_primitives::Balance;
/// The index of an account.
pub type Index = core_primitives::AccountIndex;
/// Index of a transaction in the chain.
pub type Nonce = core_primitives::Nonce;
/// The hash type. We re-export it here, but we can easily get it from block as well.
pub type Hash = core_primitives::Hash;
/// The header type. We re-export it here, but we can easily get it from block as well.
Expand Down
8 changes: 4 additions & 4 deletions utils/staking-miner/src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Wrappers around creating a signer account.

use crate::{prelude::*, rpc::SharedRpcClient, AccountId, Error, Index, Pair, LOG_TARGET};
use crate::{prelude::*, rpc::SharedRpcClient, AccountId, Error, Nonce, Pair, LOG_TARGET};
use frame_system::AccountInfo;
use sp_core::{crypto::Pair as _, storage::StorageKey};

Expand All @@ -39,8 +39,8 @@ pub(crate) async fn get_account_info<T: frame_system::Config<Hash = Hash> + EPM:
rpc: &SharedRpcClient,
who: &T::AccountId,
maybe_at: Option<T::Hash>,
) -> Result<Option<AccountInfo<Index, T::AccountData>>, Error<T>> {
rpc.get_storage_and_decode::<AccountInfo<Index, T::AccountData>>(
) -> Result<Option<AccountInfo<Nonce, T::AccountData>>, Error<T>> {
rpc.get_storage_and_decode::<AccountInfo<Nonce, T::AccountData>>(
&StorageKey(<frame_system::Account<T>>::hashed_key_for(&who)),
maybe_at,
)
Expand All @@ -52,7 +52,7 @@ pub(crate) async fn get_account_info<T: frame_system::Config<Hash = Hash> + EPM:
pub(crate) async fn signer_uri_from_string<
T: frame_system::Config<
AccountId = AccountId,
Index = Index,
Nonce = Nonce,
AccountData = pallet_balances::AccountData<Balance>,
Hash = Hash,
> + EPM::Config,
Expand Down
2 changes: 1 addition & 1 deletion xcm/pallet-xcm-benchmarks/src/fungible/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl frame_system::Config for Test {
type BlockLength = ();
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type RuntimeCall = RuntimeCall;
Expand Down
2 changes: 1 addition & 1 deletion xcm/pallet-xcm-benchmarks/src/generic/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl frame_system::Config for Test {
type BlockLength = ();
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type RuntimeCall = RuntimeCall;
Expand Down
2 changes: 1 addition & 1 deletion xcm/pallet-xcm/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ parameter_types! {
impl frame_system::Config for Test {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-builder/tests/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-simulator/example/src/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-simulator/example/src/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-simulator/fuzzer/src/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-simulator/fuzzer/src/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type Nonce = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
Expand Down