update substrate & polkadot (#472)

* update substrate

* try again
This commit is contained in:
Xiliang Chen
2021-06-05 02:43:29 +12:00
committed by GitHub
parent 23d7afceb4
commit 0a5dbafd53
8 changed files with 282 additions and 249 deletions
+261 -249
View File
File diff suppressed because it is too large Load Diff
@@ -82,6 +82,7 @@ impl system::Config for Test {
parameter_types! { parameter_types! {
pub const ExistentialDeposit: u64 = 5; pub const ExistentialDeposit: u64 = 5;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Test { impl pallet_balances::Config for Test {
@@ -92,6 +93,8 @@ impl pallet_balances::Config for Test {
type AccountStore = System; type AccountStore = System;
type WeightInfo = (); type WeightInfo = ();
type MaxLocks = (); type MaxLocks = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
pub struct Author4; pub struct Author4;
@@ -206,6 +206,7 @@ parameter_types! {
pub const CreationFee: u128 = 1 * MILLIROC; pub const CreationFee: u128 = 1 * MILLIROC;
pub const TransactionByteFee: u128 = 1 * MICROROC; pub const TransactionByteFee: u128 = 1 * MICROROC;
pub const MaxLocks: u32 = 50; pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Runtime { impl pallet_balances::Config for Runtime {
@@ -218,6 +219,8 @@ impl pallet_balances::Config for Runtime {
type AccountStore = System; type AccountStore = System;
type WeightInfo = (); type WeightInfo = ();
type MaxLocks = MaxLocks; type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
impl pallet_transaction_payment::Config for Runtime { impl pallet_transaction_payment::Config for Runtime {
@@ -209,6 +209,7 @@ impl pallet_authorship::Config for Runtime {
parameter_types! { parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50; pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Runtime { impl pallet_balances::Config for Runtime {
@@ -221,6 +222,8 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ExistentialDeposit; type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System; type AccountStore = System;
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>; type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
parameter_types! { parameter_types! {
@@ -102,6 +102,7 @@ mod tests {
.build_or_panic(); .build_or_panic();
pub BlockLength: limits::BlockLength = limits::BlockLength::max(2 * 1024); pub BlockLength: limits::BlockLength = limits::BlockLength::max(2 * 1024);
pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const AvailableBlockRatio: Perbill = Perbill::one();
pub const MaxReserves: u32 = 50;
} }
impl frame_system::Config for Test { impl frame_system::Config for Test {
@@ -138,6 +139,8 @@ mod tests {
type AccountStore = System; type AccountStore = System;
type MaxLocks = (); type MaxLocks = ();
type WeightInfo = (); type WeightInfo = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
pub struct OneAuthor; pub struct OneAuthor;
@@ -198,6 +198,7 @@ impl pallet_authorship::Config for Runtime {
parameter_types! { parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50; pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Runtime { impl pallet_balances::Config for Runtime {
@@ -210,6 +211,8 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ExistentialDeposit; type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System; type AccountStore = System;
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>; type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
parameter_types! { parameter_types! {
@@ -199,6 +199,7 @@ impl pallet_authorship::Config for Runtime {
parameter_types! { parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50; pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Runtime { impl pallet_balances::Config for Runtime {
@@ -211,6 +212,8 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ExistentialDeposit; type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System; type AccountStore = System;
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>; type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
parameter_types! { parameter_types! {
+3
View File
@@ -209,6 +209,7 @@ parameter_types! {
pub const TransferFee: u128 = 0; pub const TransferFee: u128 = 0;
pub const CreationFee: u128 = 0; pub const CreationFee: u128 = 0;
pub const TransactionByteFee: u128 = 1; pub const TransactionByteFee: u128 = 1;
pub const MaxReserves: u32 = 50;
} }
impl pallet_balances::Config for Runtime { impl pallet_balances::Config for Runtime {
@@ -221,6 +222,8 @@ impl pallet_balances::Config for Runtime {
type AccountStore = System; type AccountStore = System;
type WeightInfo = (); type WeightInfo = ();
type MaxLocks = (); type MaxLocks = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
} }
impl pallet_transaction_payment::Config for Runtime { impl pallet_transaction_payment::Config for Runtime {