Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 pallets/assets/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/bancor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = ();
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
4 changes: 2 additions & 2 deletions pallets/bid/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// use super::*;
use frame_support::{
construct_runtime, parameter_types,
traits::{OnFinalize, OnInitialize},
traits::{Everything, OnFinalize, OnInitialize},
};
use node_primitives::{CurrencyId, TokenSymbol};
use sp_core::H256;
Expand Down Expand Up @@ -61,7 +61,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = balances::AccountData<u64>;
type AccountId = u128;
type BaseCallFilter = ();
type BaseCallFilter = Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
26 changes: 17 additions & 9 deletions pallets/bridge-eos/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@

#![cfg(test)]

use crate as pallet_bridge_eos;
use codec::Decode;
use frame_support::{
construct_runtime, parameter_types, ConsensusEngineId, PalletId,
traits::{OnInitialize, OnFinalize, FindAuthor}
construct_runtime, parameter_types,
traits::{FindAuthor, OnFinalize, OnInitialize},
ConsensusEngineId, PalletId,
};
use sp_core::H256;
use sp_runtime::{testing::{Header, TestXt}, traits::{BlakeTwo256, IdentityLookup}};
use sp_runtime::{
testing::{Header, TestXt},
traits::{BlakeTwo256, IdentityLookup},
};

use super::*;
use crate as pallet_bridge_eos;
pub type AccountId = u64;
pub type BlockNumber = u64;
pub type Amount = i128;
Expand Down Expand Up @@ -61,7 +66,7 @@ parameter_types! {
frame_system::limits::BlockWeights::simple_max(1024);
}
impl frame_system::Config for Test {
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
Expand Down Expand Up @@ -136,7 +141,8 @@ pub struct AuthorGiven;

impl FindAuthor<u64> for AuthorGiven {
fn find_author<'a, I>(digests: I) -> Option<u64>
where I: 'a + IntoIterator<Item=(ConsensusEngineId, &'a [u8])>
where
I: 'a + IntoIterator<Item = (ConsensusEngineId, &'a [u8])>,
{
for (id, data) in digests {
if id == TEST_ID {
Expand All @@ -162,7 +168,8 @@ impl pallet_authorship::Config for Test {
/// An extrinsic type used for tests.
pub type Extrinsic = TestXt<Call, ()>;

impl<LocalCall> frame_system::offchain::SendTransactionTypes<LocalCall> for Test where
impl<LocalCall> frame_system::offchain::SendTransactionTypes<LocalCall> for Test
where
Call: From<LocalCall>,
{
type Extrinsic = Extrinsic;
Expand All @@ -186,7 +193,6 @@ impl crate::Config for Test {
type WeightInfo = ();
}


parameter_types! {
// 3 hours(1800 blocks) as an era
pub const VtokenMintDuration: u32 = 3 * 60 * 1;
Expand Down Expand Up @@ -243,6 +249,8 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities {
all_crosschain_privilege: Vec::new(),
cross_trade_eos_limit: 50,
eos_asset_id: CurrencyId::Token(TokenSymbol::EOS),
}.assimilate_storage(&mut t).unwrap();
}
.assimilate_storage(&mut t)
.unwrap();
t.into()
}
2 changes: 1 addition & 1 deletion pallets/flexible-fee/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ parameter_types! {
impl system::Config for Test {
type AccountData = balances::AccountData<u64>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/liquidity-mining/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ parameter_types! {
impl frame_system::Config for T {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = BlockNumber;
Expand Down
2 changes: 1 addition & 1 deletion pallets/minter-reward/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<u64>;
type AccountId = sp_runtime::AccountId32;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
15 changes: 9 additions & 6 deletions pallets/proxy-validator/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
#![cfg(test)]

use frame_support::{
construct_runtime, parameter_types
};
use frame_support::traits::{
OnInitialize, OnFinalize
construct_runtime, parameter_types,
traits::{OnFinalize, OnInitialize},
};
use sp_core::H256;
use sp_runtime::{Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup}};
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, IdentityLookup},
Perbill,
};

use super::*;

type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
Expand All @@ -49,7 +52,7 @@ parameter_types! {
frame_system::limits::BlockWeights::simple_max(1024);
}
impl frame_system::Config for Test {
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
Expand Down
2 changes: 1 addition & 1 deletion pallets/salp/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = BlockNumber;
Expand Down
2 changes: 1 addition & 1 deletion pallets/staking-reward/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = pallet_balances::AccountData<u64>;
type AccountId = u64;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/swap/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = pallet_balances::AccountData<u64>;
type AccountId = u64;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ mod tests {
impl frame_system::Config for Test {
type AccountData = pallet_balances::AccountData<u64>;
type AccountId = u64;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/vsbond-auction/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ parameter_types! {
impl frame_system::Config for Test {
type AccountData = ();
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = BlockNumber;
Expand Down
2 changes: 1 addition & 1 deletion pallets/vtoken-mint/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down
2 changes: 1 addition & 1 deletion runtime/asgard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = Everything;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = BlockHashCount;
type BlockLength = RuntimeBlockLength;
Expand Down
2 changes: 1 addition & 1 deletion runtime/dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = BlockHashCount;
type BlockLength = RuntimeBlockLength;
Expand Down
4 changes: 2 additions & 2 deletions xcm-support/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub mod para {
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down Expand Up @@ -559,7 +559,7 @@ pub mod relay {
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockLength = ();
type BlockNumber = u64;
Expand Down