difftreelog
test fix mocks
in: master
3 files changed
pallets/inflation/src/tests.rsdiffbeforeafterboth7 parameter_types,7 parameter_types,8};8};9use frame_support::{traits::OnInitialize};9use frame_support::{10 traits::{OnInitialize, Everything},11};10use sp_core::H256;12use sp_core::H256;11use sp_runtime::{13use sp_runtime::{55}57}565857impl frame_system::Config for Test {59impl frame_system::Config for Test {58 type BaseCallFilter = ();60 type BaseCallFilter = Everything;59 type BlockWeights = ();61 type BlockWeights = ();60 type BlockLength = ();62 type BlockLength = ();61 type DbWeight = ();63 type DbWeight = ();pallets/nft/src/mock.rsdiffbeforeafterboth--- a/pallets/nft/src/mock.rs
+++ b/pallets/nft/src/mock.rs
@@ -2,7 +2,7 @@
use crate as pallet_template;
use sp_core::H256;
-use frame_support::{parameter_types, weights::IdentityFee};
+use frame_support::{parameter_types, traits::Everything, weights::IdentityFee};
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
testing::Header,
@@ -12,6 +12,7 @@
use pallet_evm::AddressMapping;
use crate::{EvmBackwardsAddressMapping, CrossAccountId};
use codec::{Encode, Decode};
+use scale_info::TypeInfo;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
@@ -35,7 +36,7 @@
}
impl system::Config for Test {
- type BaseCallFilter = ();
+ type BaseCallFilter = Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
@@ -79,6 +80,7 @@
parameter_types! {
pub const TransactionByteFee: u64 = 1;
+ pub const OperationalFeeMultiplier: u8 = 5;
}
impl pallet_transaction_payment::Config for Test {
@@ -86,6 +88,7 @@
type TransactionByteFee = TransactionByteFee;
type WeightToFee = IdentityFee<u64>;
type FeeMultiplierUpdate = ();
+ type OperationalFeeMultiplier = OperationalFeeMultiplier;
}
parameter_types! {
@@ -118,7 +121,7 @@
}
}
-#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
+#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo)]
pub struct TestCrossAccountId(u64, sp_core::H160);
impl CrossAccountId<u64> for TestCrossAccountId {
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 { .. }))
}
}