difftreelog
test fix mocks
in: master
3 files changed
pallets/inflation/src/tests.rsdiffbeforeafterboth--- a/pallets/inflation/src/tests.rs
+++ b/pallets/inflation/src/tests.rs
@@ -6,7 +6,9 @@
traits::{Currency},
parameter_types,
};
-use frame_support::{traits::OnInitialize};
+use frame_support::{
+ traits::{OnInitialize, Everything},
+};
use sp_core::H256;
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
@@ -55,7 +57,7 @@
}
impl frame_system::Config for Test {
- type BaseCallFilter = ();
+ type BaseCallFilter = Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
pallets/nft/src/mock.rsdiffbeforeafterboth223use crate as pallet_template;3use crate as pallet_template;4use sp_core::H256;4use sp_core::H256;5use frame_support::{parameter_types, weights::IdentityFee};5use frame_support::{parameter_types, traits::Everything, weights::IdentityFee};6use sp_runtime::{6use sp_runtime::{7 traits::{BlakeTwo256, IdentityLookup},7 traits::{BlakeTwo256, IdentityLookup},8 testing::Header,8 testing::Header,12use pallet_evm::AddressMapping;12use pallet_evm::AddressMapping;13use crate::{EvmBackwardsAddressMapping, CrossAccountId};13use crate::{EvmBackwardsAddressMapping, CrossAccountId};14use codec::{Encode, Decode};14use codec::{Encode, Decode};15use scale_info::TypeInfo;151616type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;17type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;17type Block = frame_system::mocking::MockBlock<Test>;18type Block = frame_system::mocking::MockBlock<Test>;35}36}363737impl system::Config for Test {38impl system::Config for Test {38 type BaseCallFilter = ();39 type BaseCallFilter = Everything;39 type BlockWeights = ();40 type BlockWeights = ();40 type BlockLength = ();41 type BlockLength = ();41 type DbWeight = ();42 type DbWeight = ();798080parameter_types! {81parameter_types! {81 pub const TransactionByteFee: u64 = 1;82 pub const TransactionByteFee: u64 = 1;83 pub const OperationalFeeMultiplier: u8 = 5;82}84}838584impl pallet_transaction_payment::Config for Test {86impl pallet_transaction_payment::Config for Test {85 type OnChargeTransaction = CurrencyAdapter<pallet_balances::Pallet<Test>, ()>;87 type OnChargeTransaction = CurrencyAdapter<pallet_balances::Pallet<Test>, ()>;86 type TransactionByteFee = TransactionByteFee;88 type TransactionByteFee = TransactionByteFee;87 type WeightToFee = IdentityFee<u64>;89 type WeightToFee = IdentityFee<u64>;88 type FeeMultiplierUpdate = ();90 type FeeMultiplierUpdate = ();91 type OperationalFeeMultiplier = OperationalFeeMultiplier;89}92}909391parameter_types! {94parameter_types! {118 }121 }119}122}120123121#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]124#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo)]122pub struct TestCrossAccountId(u64, sp_core::H160);125pub struct TestCrossAccountId(u64, sp_core::H160);123impl CrossAccountId<u64> for TestCrossAccountId {126impl CrossAccountId<u64> for TestCrossAccountId {124 fn from_sub(sub: u64) -> Self {127 fn from_sub(sub: u64) -> Self {pallets/scheduler/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -796,7 +796,7 @@
use frame_support::{
Hashable, assert_err, assert_noop, assert_ok, ord_parameter_types, parameter_types,
- traits::{Contains, Filter, OnFinalize, OnInitialize},
+ traits::{Contains, OnFinalize, OnInitialize},
weights::constants::RocksDbWeight,
};
use sp_core::H256;
@@ -873,7 +873,7 @@
pub struct BaseFilter;
impl Contains<Call> for BaseFilter {
fn contains(call: &Call) -> bool {
- !matches!(call, Call::Logger(logger::Call::log(_, _)))
+ !matches!(call, Call::Logger(logger::Call::log { .. }))
}
}