From 6cafc77107dc8924d5d23640ec9be40ad6611246 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 16:31:46 +0100 Subject: [PATCH 01/23] refactor: Remove deprecated CreationFee, OnNewAccount, and TransferPayment from balances --- .../mining-speed-boosts/claims/hardware-mining/src/lib.rs | 3 --- .../mining/mining-speed-boosts/claims/token-mining/src/lib.rs | 3 --- .../configuration/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/configuration/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/eligibility/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/eligibility/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/rates/hardware-mining/src/lib.rs | 3 --- .../mining/mining-speed-boosts/rates/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/sampling/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/sampling/token-mining/src/lib.rs | 3 --- pallets/roaming/roaming-accounting-policies/src/lib.rs | 3 --- pallets/roaming/roaming-agreement-policies/src/lib.rs | 3 --- pallets/roaming/roaming-billing-policies/src/lib.rs | 3 --- pallets/roaming/roaming-charging-policies/src/lib.rs | 3 --- pallets/roaming/roaming-device-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-devices/src/lib.rs | 3 --- pallets/roaming/roaming-network-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-network-servers/src/lib.rs | 3 --- pallets/roaming/roaming-networks/src/lib.rs | 3 --- pallets/roaming/roaming-operators/src/lib.rs | 3 --- pallets/roaming/roaming-organizations/src/lib.rs | 3 --- pallets/roaming/roaming-packet-bundles/src/lib.rs | 3 --- pallets/roaming/roaming-routing-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-service-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-sessions/src/lib.rs | 3 --- runtime/tests/cli_integration_tests_mining_hardware.rs | 3 --- runtime/tests/cli_integration_tests_mining_tokens.rs | 3 --- runtime/tests/cli_integration_tests_roaming.rs | 3 --- 28 files changed, 84 deletions(-) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index 005507478..091e3178f 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -484,12 +484,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index f5fdca0d9..45c3bedeb 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -583,12 +583,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index d102f109c..926ddf462 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -448,12 +448,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index 9117a12dd..e8c5e9a5e 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -511,12 +511,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index 04eb4efde..23132cfab 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -670,12 +670,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index a886af686..87f07512d 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -662,12 +662,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index 2bb451adb..a2f34e21c 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -370,12 +370,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index 2663c1602..180cea66e 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -395,12 +395,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index b20f78648..959772972 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -470,12 +470,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index a060daae4..cd4d7100c 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -462,12 +462,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index 094e35316..c6877d387 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -458,12 +458,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index de379d2a6..f982de645 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -535,12 +535,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index 5fd98fc91..de6b288f8 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -510,12 +510,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index 851e18255..9af51157f 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -523,12 +523,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index 1ec4f9da9..f0049bb63 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -447,12 +447,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index b59e27ee2..b71084ba7 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -425,12 +425,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index cec73ef95..e833bbde8 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -805,12 +805,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index dbf423f7e..7d7e8ea2f 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -422,12 +422,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index 95c32b0c6..784bf6856 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -334,12 +334,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 8b45b9515..116bf00b3 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -259,12 +259,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index 5c9045277..1911b7bc6 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -353,12 +353,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index e77fa109a..849f90b8b 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -687,12 +687,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index e178dc895..b53d0cfa3 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -330,12 +330,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index 66ee10534..4c946e717 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -366,12 +366,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index d2fb54882..6494668db 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -541,12 +541,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index e220f045d..bf1e8a828 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -91,12 +91,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index d48bf2a8e..72df99267 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -91,12 +91,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index ffd7994e9..d3adf0e72 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -133,12 +133,9 @@ mod tests { } impl balances::Trait for Test { type Balance = u64; - type CreationFee = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); } impl transaction_payment::Trait for Test { type Currency = Balances; From 7f306f93f8b16cd04c0c45d65c8132abe9ac5c43 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 16:34:38 +0100 Subject: [PATCH 02/23] refactor: Remove deprecated vesting from balances::GenesisConfig --- .../mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs | 1 - .../mining/mining-speed-boosts/claims/token-mining/src/lib.rs | 1 - .../mining-speed-boosts/configuration/hardware-mining/src/lib.rs | 1 - .../mining-speed-boosts/configuration/token-mining/src/lib.rs | 1 - .../mining-speed-boosts/eligibility/hardware-mining/src/lib.rs | 1 - .../mining-speed-boosts/eligibility/token-mining/src/lib.rs | 1 - .../mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs | 1 - pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs | 1 - .../mining-speed-boosts/sampling/hardware-mining/src/lib.rs | 1 - .../mining/mining-speed-boosts/sampling/token-mining/src/lib.rs | 1 - pallets/roaming/roaming-accounting-policies/src/lib.rs | 1 - pallets/roaming/roaming-agreement-policies/src/lib.rs | 1 - pallets/roaming/roaming-billing-policies/src/lib.rs | 1 - pallets/roaming/roaming-charging-policies/src/lib.rs | 1 - pallets/roaming/roaming-device-profiles/src/lib.rs | 1 - pallets/roaming/roaming-devices/src/lib.rs | 1 - pallets/roaming/roaming-network-profiles/src/lib.rs | 1 - pallets/roaming/roaming-network-servers/src/lib.rs | 1 - pallets/roaming/roaming-networks/src/lib.rs | 1 - pallets/roaming/roaming-operators/src/lib.rs | 1 - pallets/roaming/roaming-organizations/src/lib.rs | 1 - pallets/roaming/roaming-packet-bundles/src/lib.rs | 1 - pallets/roaming/roaming-routing-profiles/src/lib.rs | 1 - pallets/roaming/roaming-service-profiles/src/lib.rs | 1 - pallets/roaming/roaming-sessions/src/lib.rs | 1 - runtime/tests/cli_integration_tests_mining_hardware.rs | 1 - runtime/tests/cli_integration_tests_mining_tokens.rs | 1 - runtime/tests/cli_integration_tests_roaming.rs | 1 - 28 files changed, 28 deletions(-) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index 091e3178f..5b85f19a0 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -560,7 +560,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index 45c3bedeb..df2960735 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -659,7 +659,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index 926ddf462..ac3345904 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -492,7 +492,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index e8c5e9a5e..3236aa9ae 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -553,7 +553,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index 23132cfab..e6f0387b1 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -740,7 +740,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index 87f07512d..472ecbaee 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -730,7 +730,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index a2f34e21c..8b707abfd 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -407,7 +407,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index 180cea66e..60611824f 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -434,7 +434,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index 959772972..afa805352 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -523,7 +523,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index cd4d7100c..f1113c6cf 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -513,7 +513,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index c6877d387..fb3ab9185 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -498,7 +498,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index f982de645..54ad914cf 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -582,7 +582,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index de6b288f8..a6238f4ef 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -549,7 +549,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index 9af51157f..e8e1b379c 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -562,7 +562,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index f0049bb63..2e3740511 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -500,7 +500,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index b71084ba7..b871136a1 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -470,7 +470,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index e833bbde8..e27d0689a 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -854,7 +854,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index 7d7e8ea2f..f9bf67a94 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -459,7 +459,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index 784bf6856..a6f026ee2 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -367,7 +367,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 116bf00b3..5b09ca7cd 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -288,7 +288,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index 1911b7bc6..0f0f9b18e 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -394,7 +394,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index 849f90b8b..c8e125a81 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -749,7 +749,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index b53d0cfa3..7664cf491 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -380,7 +380,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index 4c946e717..a08e2f0a6 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -411,7 +411,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index 6494668db..939e0948c 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -593,7 +593,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index bf1e8a828..883aa993e 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -172,7 +172,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index 72df99267..2fe42b086 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -171,7 +171,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index d3adf0e72..56d22ff84 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -239,7 +239,6 @@ mod tests { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30)], - vesting: vec![], } .assimilate_storage(&mut t) .unwrap(); From 6d02fa7d1671b41bd45df723a98b64661e9c6ecf Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 17:12:38 +0100 Subject: [PATCH 03/23] refactor: Add to system trait AccountData, OnNewAccount, OnReapAccount. Add to balance trait AccountData, AccountStore, OnNewAccount, OnReapAccount --- .../mining-speed-boosts/claims/hardware-mining/src/lib.rs | 7 +++++++ .../mining-speed-boosts/claims/token-mining/src/lib.rs | 7 +++++++ .../configuration/hardware-mining/src/lib.rs | 7 +++++++ .../configuration/token-mining/src/lib.rs | 7 +++++++ .../eligibility/hardware-mining/src/lib.rs | 7 +++++++ .../eligibility/token-mining/src/lib.rs | 7 +++++++ .../mining-speed-boosts/rates/hardware-mining/src/lib.rs | 7 +++++++ .../mining-speed-boosts/rates/token-mining/src/lib.rs | 7 +++++++ .../sampling/hardware-mining/src/lib.rs | 7 +++++++ .../mining-speed-boosts/sampling/token-mining/src/lib.rs | 7 +++++++ pallets/roaming/roaming-accounting-policies/src/lib.rs | 7 +++++++ pallets/roaming/roaming-agreement-policies/src/lib.rs | 7 +++++++ pallets/roaming/roaming-billing-policies/src/lib.rs | 7 +++++++ pallets/roaming/roaming-charging-policies/src/lib.rs | 7 +++++++ pallets/roaming/roaming-device-profiles/src/lib.rs | 7 +++++++ pallets/roaming/roaming-devices/src/lib.rs | 7 +++++++ pallets/roaming/roaming-network-profiles/src/lib.rs | 7 +++++++ pallets/roaming/roaming-network-servers/src/lib.rs | 7 +++++++ pallets/roaming/roaming-networks/src/lib.rs | 7 +++++++ pallets/roaming/roaming-operators/src/lib.rs | 7 +++++++ pallets/roaming/roaming-organizations/src/lib.rs | 7 +++++++ pallets/roaming/roaming-packet-bundles/src/lib.rs | 7 +++++++ pallets/roaming/roaming-routing-profiles/src/lib.rs | 7 +++++++ pallets/roaming/roaming-service-profiles/src/lib.rs | 7 +++++++ pallets/roaming/roaming-sessions/src/lib.rs | 7 +++++++ runtime/tests/cli_integration_tests_mining_hardware.rs | 7 +++++++ runtime/tests/cli_integration_tests_mining_tokens.rs | 7 +++++++ runtime/tests/cli_integration_tests_roaming.rs | 7 +++++++ 28 files changed, 196 insertions(+) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index 5b85f19a0..105c1a96c 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -464,6 +464,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -479,14 +480,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index df2960735..77ed4388e 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -563,6 +563,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -578,14 +579,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index ac3345904..488f329b8 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -428,6 +428,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -443,14 +444,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index 3236aa9ae..7a31f2905 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -491,6 +491,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -506,14 +507,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index e6f0387b1..c0b3d5b18 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -650,6 +650,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -665,14 +666,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index 472ecbaee..dad4ec6b0 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -642,6 +642,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -657,14 +658,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index 8b707abfd..fcfa482f9 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -350,6 +350,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -365,14 +366,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index 60611824f..a2c8fa960 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -375,6 +375,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -390,14 +391,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index afa805352..dc56347f4 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -450,6 +450,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -465,14 +466,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index f1113c6cf..eddc8eb0d 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -442,6 +442,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -457,14 +458,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index fb3ab9185..adfffe8ee 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -438,6 +438,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -453,14 +454,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index 54ad914cf..7901b374e 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -515,6 +515,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -530,14 +531,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index a6238f4ef..0c168143d 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -490,6 +490,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -505,14 +506,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index e8e1b379c..a2c97756a 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -503,6 +503,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -518,14 +519,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index 2e3740511..5235b3570 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -427,6 +427,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -442,14 +443,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index b871136a1..75e50d727 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -405,6 +405,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -420,14 +421,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index e27d0689a..9fe4ac1da 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -785,6 +785,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -800,14 +801,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index f9bf67a94..b104f8a06 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -402,6 +402,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -417,14 +418,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index a6f026ee2..3f456404a 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -314,6 +314,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -329,14 +330,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 5b09ca7cd..92ed9e36e 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -239,6 +239,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -254,14 +255,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index 0f0f9b18e..1c3dcbab7 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -333,6 +333,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -348,14 +349,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index c8e125a81..1e7204f51 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -667,6 +667,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -682,14 +683,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index 7664cf491..bcc8a16b4 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -310,6 +310,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -325,14 +326,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index a08e2f0a6..0eeba3720 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -346,6 +346,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -361,14 +362,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index 939e0948c..289df4921 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -521,6 +521,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -536,14 +537,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index 883aa993e..c09ddda9c 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -71,6 +71,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -86,14 +87,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index 2fe42b086..bb9ba3395 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -71,6 +71,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -86,14 +87,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 56d22ff84..07de8bf55 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -113,6 +113,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = (); type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -128,14 +129,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + type OnReapAccount = (); type Origin = Origin; type Version = (); } impl balances::Trait for Test { + type AccountData = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); + type OnNewAccount = (); + type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; From bed4570ba09c628d2020bc0712300056e210dbc9 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 18:57:18 +0100 Subject: [PATCH 04/23] fix: Remove incorrectly used types --- runtime/tests/cli_integration_tests_mining_hardware.rs | 3 --- runtime/tests/cli_integration_tests_mining_tokens.rs | 3 --- runtime/tests/cli_integration_tests_roaming.rs | 3 --- 3 files changed, 9 deletions(-) diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index c09ddda9c..4cd05272d 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -93,14 +93,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index bb9ba3395..e9d060a7e 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -93,14 +93,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 07de8bf55..107497b05 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -135,14 +135,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; From 9dda287bb412addd4ac5deb66ed1431d151b66ec Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 22:08:56 +0100 Subject: [PATCH 05/23] balance AccountStore is System in runtime --- runtime/tests/cli_integration_tests_mining_hardware.rs | 2 +- runtime/tests/cli_integration_tests_mining_tokens.rs | 4 ++-- runtime/tests/cli_integration_tests_roaming.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index 4cd05272d..87fbafaa0 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -160,7 +160,7 @@ mod tests { type MiningSpeedBoostClaimsHardwareMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationHardwareMiningTestModule = MiningSpeedBoostConfigurationHardwareMiningModule; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index e9d060a7e..e23122063 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -93,7 +93,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); @@ -160,7 +160,7 @@ mod tests { type MiningSpeedBoostClaimsTokenMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationTokenMiningTestModule = MiningSpeedBoostConfigurationTokenMiningModule; type MiningSpeedBoostRatesTokenMiningTestModule = MiningSpeedBoostRatesTokenMiningModule; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 107497b05..468127679 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -135,7 +135,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); @@ -220,7 +220,7 @@ mod tests { type RoamingDeviceProfileVendorID = Vec; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingOperatorTestModule = RoamingOperatorModule; type RoamingNetworkTestModule = RoamingNetworkModule; From c988b0c2f8b2d36e52d9ef003b3213081dd3a35f Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 22:34:05 +0100 Subject: [PATCH 06/23] WIP --- .../mining-speed-boosts/claims/hardware-mining/src/lib.rs | 3 --- .../mining/mining-speed-boosts/claims/token-mining/src/lib.rs | 3 --- .../configuration/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/configuration/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/eligibility/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/eligibility/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/rates/hardware-mining/src/lib.rs | 3 --- .../mining/mining-speed-boosts/rates/token-mining/src/lib.rs | 3 --- .../mining-speed-boosts/sampling/hardware-mining/src/lib.rs | 3 --- .../mining-speed-boosts/sampling/token-mining/src/lib.rs | 3 --- pallets/roaming/roaming-accounting-policies/src/lib.rs | 3 --- pallets/roaming/roaming-agreement-policies/src/lib.rs | 3 --- pallets/roaming/roaming-billing-policies/src/lib.rs | 3 --- pallets/roaming/roaming-charging-policies/src/lib.rs | 3 --- pallets/roaming/roaming-device-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-devices/src/lib.rs | 3 --- pallets/roaming/roaming-network-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-network-servers/src/lib.rs | 3 --- pallets/roaming/roaming-networks/src/lib.rs | 3 --- pallets/roaming/roaming-operators/src/lib.rs | 3 --- pallets/roaming/roaming-organizations/src/lib.rs | 3 --- pallets/roaming/roaming-packet-bundles/src/lib.rs | 3 --- pallets/roaming/roaming-routing-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-service-profiles/src/lib.rs | 3 --- pallets/roaming/roaming-sessions/src/lib.rs | 3 --- runtime/tests/cli_integration_tests_mining_hardware.rs | 2 +- runtime/tests/cli_integration_tests_mining_tokens.rs | 2 +- runtime/tests/cli_integration_tests_roaming.rs | 2 +- 28 files changed, 3 insertions(+), 78 deletions(-) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index 105c1a96c..ccd89127b 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -486,14 +486,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index 77ed4388e..390afc488 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -585,14 +585,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index 488f329b8..941964053 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -450,14 +450,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index 7a31f2905..6f29e726e 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -513,14 +513,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index c0b3d5b18..efceb1577 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -672,14 +672,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index dad4ec6b0..55cc548ac 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -664,14 +664,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index fcfa482f9..f2f8ab023 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -372,14 +372,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index a2c8fa960..e116eb584 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -397,14 +397,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index dc56347f4..d72f45258 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -472,14 +472,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index eddc8eb0d..2ac179ec1 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -464,14 +464,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index adfffe8ee..bf22f3155 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -460,14 +460,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index 7901b374e..4c1f8a00a 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -537,14 +537,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index 0c168143d..614f27211 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -512,14 +512,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index a2c97756a..9fb085d7b 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -525,14 +525,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index 5235b3570..62987412e 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -449,14 +449,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index 75e50d727..156dd1238 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -427,14 +427,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index 9fe4ac1da..ca94dd32f 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -807,14 +807,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index b104f8a06..8850a317e 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -424,14 +424,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index 3f456404a..b78a99de3 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -336,14 +336,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 92ed9e36e..6be383222 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -261,14 +261,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index 1c3dcbab7..7c8de8848 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -355,14 +355,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index 1e7204f51..a01dd364a 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -689,14 +689,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index bcc8a16b4..590c90582 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -332,14 +332,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index 0eeba3720..ac96a3af2 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -368,14 +368,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index 289df4921..4c181aac0 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -543,14 +543,11 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountData = (); type AccountStore = (); type Balance = u64; type DustRemoval = (); type Event = (); type ExistentialDeposit = (); - type OnNewAccount = (); - type OnReapAccount = (); } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index 87fbafaa0..54a5fa75e 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -93,7 +93,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; // balances::AccountData; // u128 is Balance type Balance = u64; type DustRemoval = (); type Event = (); diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index e23122063..940eaaf92 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -93,7 +93,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; // balances::AccountData; // u128 is Balance type Balance = u64; type DustRemoval = (); type Event = (); diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 468127679..3b36d423a 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -135,7 +135,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; // balances::AccountData; // u128 is Balance type Balance = u64; type DustRemoval = (); type Event = (); From ed910f5960a75167edae0e4d8ac8734036267561 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 22:46:18 +0100 Subject: [PATCH 07/23] use System like in the Substrate repo --- runtime/tests/cli_integration_tests_mining_hardware.rs | 2 +- runtime/tests/cli_integration_tests_mining_tokens.rs | 2 +- runtime/tests/cli_integration_tests_roaming.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index 54a5fa75e..fb53172f5 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -93,7 +93,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = System; // balances::AccountData; // u128 is Balance + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index 940eaaf92..af95f16d1 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -93,7 +93,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = System; // balances::AccountData; // u128 is Balance + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 3b36d423a..5545a3a2d 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -135,7 +135,7 @@ mod tests { type Version = (); } impl balances::Trait for Test { - type AccountStore = System; // balances::AccountData; // u128 is Balance + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); From f128e983e9a2c0e36b3f8ea3d9f9fa0b5a76dc0c Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 20 Feb 2020 23:09:00 +0100 Subject: [PATCH 08/23] fix: In runtime the balance module uses system module. So in test module, the test balance module needs to use the test system module --- runtime/tests/cli_integration_tests_mining_hardware.rs | 2 +- runtime/tests/cli_integration_tests_mining_tokens.rs | 2 +- runtime/tests/cli_integration_tests_roaming.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index fb53172f5..88a1b83a9 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -71,7 +71,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index af95f16d1..0136e8d82 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -71,7 +71,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 5545a3a2d..94fecb10f 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -113,7 +113,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; From ea570be1dbf0092a2eaafa0ca0a76f67a6357fb8 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 09:48:57 +0100 Subject: [PATCH 09/23] fix: Add ExistentialDeposit to parameter_types --- README.md | 7 +++++++ runtime/tests/cli_integration_tests_mining_hardware.rs | 7 +++++-- runtime/tests/cli_integration_tests_mining_tokens.rs | 7 +++++-- runtime/tests/cli_integration_tests_roaming.rs | 7 +++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8ca9b3b8d..e51fecbc2 100644 --- a/README.md +++ b/README.md @@ -319,6 +319,13 @@ cargo test -p mining-speed-boosts-claims-hardware-mining cargo test -p node-runtime ``` +#### Specific Integration Tests + +Example +``` +cargo test -p node-runtime --test cli_integration_tests_mining_tokens +``` + ### Check ``` diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index 88a1b83a9..df421d541 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -91,13 +91,16 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index 0136e8d82..5e08d8b18 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -91,13 +91,16 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index 94fecb10f..cb8555579 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -133,13 +133,16 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; From f875cfd8e4e50ce2233ab67b546a6109ac372ce0 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 10:42:42 +0100 Subject: [PATCH 10/23] test: Fix all tests --- .../claims/hardware-mining/src/lib.rs | 11 +++++++---- .../claims/token-mining/src/lib.rs | 11 +++++++---- .../configuration/hardware-mining/src/lib.rs | 11 +++++++---- .../configuration/token-mining/src/lib.rs | 11 +++++++---- .../eligibility/hardware-mining/src/lib.rs | 11 +++++++---- .../eligibility/token-mining/src/lib.rs | 11 +++++++---- .../rates/hardware-mining/src/lib.rs | 11 +++++++---- .../rates/token-mining/src/lib.rs | 11 +++++++---- .../sampling/hardware-mining/src/lib.rs | 11 +++++++---- .../sampling/token-mining/src/lib.rs | 11 +++++++---- .../roaming/roaming-accounting-policies/src/lib.rs | 14 +++++++++----- .../roaming/roaming-agreement-policies/src/lib.rs | 14 +++++++++----- .../roaming/roaming-billing-policies/src/lib.rs | 12 ++++++++---- .../roaming/roaming-charging-policies/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-device-profiles/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-devices/src/lib.rs | 12 ++++++++---- .../roaming/roaming-network-profiles/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-network-servers/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-networks/src/lib.rs | 14 +++++++++----- pallets/roaming/roaming-operators/src/lib.rs | 14 +++++++++----- pallets/roaming/roaming-organizations/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-packet-bundles/src/lib.rs | 12 ++++++++---- .../roaming/roaming-routing-profiles/src/lib.rs | 12 ++++++++---- .../roaming/roaming-service-profiles/src/lib.rs | 12 ++++++++---- pallets/roaming/roaming-sessions/src/lib.rs | 12 ++++++++---- 25 files changed, 194 insertions(+), 104 deletions(-) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index ccd89127b..3617c6301 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -464,7 +464,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -485,12 +485,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -553,7 +556,7 @@ mod tests { type MiningSpeedBoostClaimsHardwareMiningClaimDateRedeemed = u64; type MiningSpeedBoostClaimsHardwareMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostClaimsHardwareMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index 390afc488..7ab0a5a63 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -563,7 +563,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -584,12 +584,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -652,7 +655,7 @@ mod tests { type MiningSpeedBoostClaimsTokenMiningClaimDateRedeemed = u64; type MiningSpeedBoostClaimsTokenMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostClaimsTokenMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index 941964053..ddf2fc034 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -428,7 +428,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -449,12 +449,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -485,7 +488,7 @@ mod tests { type MiningSpeedBoostConfigurationHardwareMiningHardwareType = Vec; type MiningSpeedBoostConfigurationHardwareMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationHardwareMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index 6f29e726e..693ba9235 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -491,7 +491,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -512,12 +512,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -546,7 +549,7 @@ mod tests { // FIXME - how to use this enum from std? (including importing `use std::str::FromStr;`) type MiningSpeedBoostConfigurationTokenMiningTokenType = Vec; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationTokenMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index efceb1577..167970b4d 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -650,7 +650,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -671,12 +671,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -733,7 +736,7 @@ mod tests { // type MiningSpeedBoostEligibilityHardwareMiningDateAudited = u64; // type MiningSpeedBoostEligibilityHardwareMiningAuditorAccountID = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostEligibilityHardwareMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index 55cc548ac..9f518baa2 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -642,7 +642,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -663,12 +663,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -723,7 +726,7 @@ mod tests { // type MiningSpeedBoostEligibilityTokenMiningDateAudited = u64; // type MiningSpeedBoostEligibilityTokenMiningAuditorAccountID = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostEligibilityTokenMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index f2f8ab023..1194e2e9c 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -350,7 +350,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -371,12 +371,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -400,7 +403,7 @@ mod tests { type MiningSpeedBoostRatesHardwareMiningIndex = u64; type MiningSpeedBoostRatesHardwareMiningMaxHardware = u32; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostRatesHardwareMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index e116eb584..feb7aaee0 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -375,7 +375,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -396,12 +396,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -427,7 +430,7 @@ mod tests { type MiningSpeedBoostRatesTokenMiningTokenIOTA = u32; type MiningSpeedBoostRatesTokenMiningTokenMXC = u32; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostRatesTokenMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index d72f45258..bb058bb91 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -450,7 +450,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -471,12 +471,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -516,7 +519,7 @@ mod tests { type MiningSpeedBoostSamplingHardwareMiningSampleDate = u64; type MiningSpeedBoostSamplingHardwareMiningSampleHardwareOnline = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostSamplingHardwareMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index 2ac179ec1..602afb38d 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -442,7 +442,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -463,12 +463,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -506,7 +509,7 @@ mod tests { type MiningSpeedBoostSamplingTokenMiningSampleDate = u64; type MiningSpeedBoostSamplingTokenMiningSampleTokensLocked = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostSamplingTokenMiningTestModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index bf22f3155..c6de6588b 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -410,7 +410,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, + assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -438,7 +439,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -459,12 +460,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -491,7 +495,7 @@ mod tests { type RoamingAccountingPolicyType = Vec; type RoamingAccountingPolicyUplinkFeeFactor = u32; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingAccountingPolicyModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index 4c1f8a00a..1e9a560ae 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -487,7 +487,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, + assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -515,7 +516,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -536,12 +537,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -575,7 +579,7 @@ mod tests { type RoamingAgreementPolicyExpiry = u64; type RoamingAgreementPolicyIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingAgreementPolicyModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index 614f27211..e306f0818 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -463,6 +463,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -490,7 +491,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -511,12 +512,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -542,7 +546,7 @@ mod tests { type RoamingBillingPolicyIndex = u64; type RoamingBillingPolicyNextBillingAt = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingBillingPolicyModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index 9fb085d7b..72de40358 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -476,6 +476,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -503,7 +504,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -524,12 +525,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -555,7 +559,7 @@ mod tests { type RoamingChargingPolicyIndex = u64; type RoamingChargingPolicyNextChargingAt = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingChargingPolicyModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index 62987412e..bc6e8b195 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -400,6 +400,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -427,7 +428,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -448,12 +449,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -493,7 +497,7 @@ mod tests { type RoamingDeviceProfileJoinEUI = Vec; type RoamingDeviceProfileVendorID = Vec; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingDeviceProfileModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index 156dd1238..a6a026fca 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -378,6 +378,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -405,7 +406,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -426,12 +427,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -463,7 +467,7 @@ mod tests { type Event = (); type RoamingDeviceIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingDeviceModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index ca94dd32f..e14cdb374 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -758,6 +758,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -785,7 +786,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -806,12 +807,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -847,7 +851,7 @@ mod tests { type Event = (); type RoamingNetworkProfileIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingNetworkProfileModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index 8850a317e..58c3f1efa 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -375,6 +375,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -402,7 +403,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -423,12 +424,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -452,7 +456,7 @@ mod tests { type Event = (); type RoamingNetworkServerIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingNetworkServerModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index b78a99de3..fd8684af0 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -286,7 +286,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, + assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -314,7 +315,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -335,12 +336,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -360,7 +364,7 @@ mod tests { type Event = (); type RoamingNetworkIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingNetworkModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 6be383222..0324da9e6 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -211,7 +211,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, + assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -239,7 +240,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -260,12 +261,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -281,7 +285,7 @@ mod tests { type Randomness = Randomness; type RoamingOperatorIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingOperatorModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index 7c8de8848..b6bdce97e 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -306,6 +306,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -333,7 +334,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -354,12 +355,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -387,7 +391,7 @@ mod tests { type Event = (); type RoamingOrganizationIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingOrganizationModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index a01dd364a..58859e85c 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -640,6 +640,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -667,7 +668,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -688,12 +689,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -742,7 +746,7 @@ mod tests { type RoamingPacketBundleReceivedPacketsOkCount = u64; type RoamingPacketBundleReceivedStartedAt = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingPacketBundleModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index 590c90582..2d4e798f0 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -283,6 +283,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -310,7 +311,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -331,12 +332,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -373,7 +377,7 @@ mod tests { type RoamingRoutingProfileAppServer = Vec; type RoamingRoutingProfileIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingRoutingProfileModule = Module; type Randomness = randomness_collective_flip::Module; diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index ac96a3af2..040198fce 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -319,6 +319,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -346,7 +347,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -367,12 +368,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -403,7 +407,7 @@ mod tests { type RoamingServiceProfileUplinkRate = u32; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingServiceProfileModule = Module; type RoamingNetworkServerModule = roaming_network_servers::Module; diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index 4c181aac0..07fde0ee3 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -494,6 +494,7 @@ mod tests { use frame_support::{ assert_ok, + assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -521,7 +522,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { - type AccountData = (); + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -542,12 +543,15 @@ mod tests { type Origin = Origin; type Version = (); } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { - type AccountStore = (); + type AccountStore = System; type Balance = u64; type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -586,7 +590,7 @@ mod tests { type RoamingSessionJoinRequestAcceptExpiry = u64; type RoamingSessionJoinRequestRequestedAt = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingSessionModule = Module; type Randomness = randomness_collective_flip::Module; From 7167ee7c7fdb5b4593710c78531c2090dce8034f Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 10:47:02 +0100 Subject: [PATCH 11/23] refactor: Fix linting --- .../claims/hardware-mining/src/lib.rs | 6 +++--- .../mining-speed-boosts/claims/token-mining/src/lib.rs | 6 +++--- .../configuration/hardware-mining/src/lib.rs | 6 +++--- .../configuration/token-mining/src/lib.rs | 6 +++--- .../eligibility/hardware-mining/src/lib.rs | 6 +++--- .../eligibility/token-mining/src/lib.rs | 6 +++--- .../rates/hardware-mining/src/lib.rs | 6 +++--- .../mining-speed-boosts/rates/token-mining/src/lib.rs | 6 +++--- .../sampling/hardware-mining/src/lib.rs | 6 +++--- .../sampling/token-mining/src/lib.rs | 6 +++--- pallets/roaming/roaming-accounting-policies/src/lib.rs | 10 +++++----- pallets/roaming/roaming-agreement-policies/src/lib.rs | 10 +++++----- pallets/roaming/roaming-billing-policies/src/lib.rs | 8 ++++---- pallets/roaming/roaming-charging-policies/src/lib.rs | 8 ++++---- pallets/roaming/roaming-device-profiles/src/lib.rs | 8 ++++---- pallets/roaming/roaming-devices/src/lib.rs | 8 ++++---- pallets/roaming/roaming-network-profiles/src/lib.rs | 8 ++++---- pallets/roaming/roaming-network-servers/src/lib.rs | 8 ++++---- pallets/roaming/roaming-networks/src/lib.rs | 10 +++++----- pallets/roaming/roaming-operators/src/lib.rs | 10 +++++----- pallets/roaming/roaming-organizations/src/lib.rs | 8 ++++---- pallets/roaming/roaming-packet-bundles/src/lib.rs | 8 ++++---- pallets/roaming/roaming-routing-profiles/src/lib.rs | 8 ++++---- pallets/roaming/roaming-service-profiles/src/lib.rs | 8 ++++---- pallets/roaming/roaming-sessions/src/lib.rs | 8 ++++---- runtime/tests/cli_integration_tests_mining_hardware.rs | 8 ++++---- runtime/tests/cli_integration_tests_mining_tokens.rs | 8 ++++---- runtime/tests/cli_integration_tests_roaming.rs | 8 ++++---- 28 files changed, 106 insertions(+), 106 deletions(-) diff --git a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs index 3617c6301..a6b615f38 100644 --- a/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/hardware-mining/src/lib.rs @@ -485,9 +485,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs index 7ab0a5a63..58de50aaf 100644 --- a/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/claims/token-mining/src/lib.rs @@ -584,9 +584,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs index ddf2fc034..6a16731b9 100644 --- a/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/hardware-mining/src/lib.rs @@ -449,9 +449,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs index 693ba9235..3c637326b 100644 --- a/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/configuration/token-mining/src/lib.rs @@ -512,9 +512,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index 167970b4d..a7d1c5a4a 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs @@ -671,9 +671,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs index 9f518baa2..2d36158b9 100644 --- a/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/eligibility/token-mining/src/lib.rs @@ -663,9 +663,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs index 1194e2e9c..25f73e56a 100644 --- a/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/hardware-mining/src/lib.rs @@ -371,9 +371,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs index feb7aaee0..da33fca50 100644 --- a/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/rates/token-mining/src/lib.rs @@ -396,9 +396,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs index bb058bb91..6825d940a 100644 --- a/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/hardware-mining/src/lib.rs @@ -471,9 +471,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs index 602afb38d..82d0c0dc7 100644 --- a/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs +++ b/pallets/mining/mining-speed-boosts/sampling/token-mining/src/lib.rs @@ -463,9 +463,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-accounting-policies/src/lib.rs b/pallets/roaming/roaming-accounting-policies/src/lib.rs index c6de6588b..62861c89d 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -410,8 +410,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, - assert_noop, + assert_noop, + assert_ok, impl_outer_origin, parameter_types, weights::Weight, @@ -460,9 +460,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-agreement-policies/src/lib.rs b/pallets/roaming/roaming-agreement-policies/src/lib.rs index 1e9a560ae..792263a93 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -487,8 +487,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, - assert_noop, + assert_noop, + assert_ok, impl_outer_origin, parameter_types, weights::Weight, @@ -537,9 +537,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-billing-policies/src/lib.rs b/pallets/roaming/roaming-billing-policies/src/lib.rs index e306f0818..f3762d3aa 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -462,8 +462,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -512,9 +512,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-charging-policies/src/lib.rs b/pallets/roaming/roaming-charging-policies/src/lib.rs index 72de40358..8f0d5896e 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -475,8 +475,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -525,9 +525,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-device-profiles/src/lib.rs b/pallets/roaming/roaming-device-profiles/src/lib.rs index bc6e8b195..54ce129be 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -399,8 +399,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -449,9 +449,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-devices/src/lib.rs b/pallets/roaming/roaming-devices/src/lib.rs index a6a026fca..90a85763d 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -377,8 +377,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -427,9 +427,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-network-profiles/src/lib.rs b/pallets/roaming/roaming-network-profiles/src/lib.rs index e14cdb374..f1d40e18d 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -757,8 +757,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -807,9 +807,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-network-servers/src/lib.rs b/pallets/roaming/roaming-network-servers/src/lib.rs index 58c3f1efa..cada31fe2 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -374,8 +374,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -424,9 +424,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-networks/src/lib.rs b/pallets/roaming/roaming-networks/src/lib.rs index fd8684af0..cd338d708 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -286,8 +286,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, - assert_noop, + assert_noop, + assert_ok, impl_outer_origin, parameter_types, weights::Weight, @@ -336,9 +336,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-operators/src/lib.rs b/pallets/roaming/roaming-operators/src/lib.rs index 0324da9e6..36eb9f029 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -211,8 +211,8 @@ mod tests { use super::*; use frame_support::{ - assert_ok, - assert_noop, + assert_noop, + assert_ok, impl_outer_origin, parameter_types, weights::Weight, @@ -261,9 +261,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-organizations/src/lib.rs b/pallets/roaming/roaming-organizations/src/lib.rs index b6bdce97e..55fce5d28 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -305,8 +305,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -355,9 +355,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-packet-bundles/src/lib.rs b/pallets/roaming/roaming-packet-bundles/src/lib.rs index 58859e85c..fa1470d29 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -639,8 +639,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -689,9 +689,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-routing-profiles/src/lib.rs b/pallets/roaming/roaming-routing-profiles/src/lib.rs index 2d4e798f0..dd32b794e 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -282,8 +282,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -332,9 +332,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-service-profiles/src/lib.rs b/pallets/roaming/roaming-service-profiles/src/lib.rs index 040198fce..00f4d858a 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -318,8 +318,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -368,9 +368,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/pallets/roaming/roaming-sessions/src/lib.rs b/pallets/roaming/roaming-sessions/src/lib.rs index 07fde0ee3..5f6d7e9a7 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -493,8 +493,8 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, - assert_noop, impl_outer_origin, parameter_types, weights::Weight, @@ -543,9 +543,9 @@ mod tests { type Origin = Origin; type Version = (); } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/runtime/tests/cli_integration_tests_mining_hardware.rs b/runtime/tests/cli_integration_tests_mining_hardware.rs index df421d541..9fe29e073 100644 --- a/runtime/tests/cli_integration_tests_mining_hardware.rs +++ b/runtime/tests/cli_integration_tests_mining_hardware.rs @@ -91,10 +91,10 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/runtime/tests/cli_integration_tests_mining_tokens.rs b/runtime/tests/cli_integration_tests_mining_tokens.rs index 5e08d8b18..f381274ab 100644 --- a/runtime/tests/cli_integration_tests_mining_tokens.rs +++ b/runtime/tests/cli_integration_tests_mining_tokens.rs @@ -91,10 +91,10 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; diff --git a/runtime/tests/cli_integration_tests_roaming.rs b/runtime/tests/cli_integration_tests_roaming.rs index cb8555579..fe5af139b 100644 --- a/runtime/tests/cli_integration_tests_roaming.rs +++ b/runtime/tests/cli_integration_tests_roaming.rs @@ -133,10 +133,10 @@ mod tests { type OnReapAccount = (); type Origin = Origin; type Version = (); - } - parameter_types! { - pub const ExistentialDeposit: u64 = 1; - } + } + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } impl balances::Trait for Test { type AccountStore = System; type Balance = u64; From 49be315294a5ef92fb19738049fb409eb8b950d8 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 11:21:54 +0100 Subject: [PATCH 12/23] run cargo check using nightly --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e51fecbc2..e1ec07927 100644 --- a/README.md +++ b/README.md @@ -459,7 +459,7 @@ rustup component add rustfmt --toolchain nightly Check that you agree with all the formating changes that RustFmt will apply to identify anything that you do not agree with. ```bash -cargo fmt --all -- --check +cargo +nightly fmt --all -- --check ``` ### Apply Formating Changes From fbde050f227b66a8df8795f5787c808481d0559b Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 11:31:52 +0100 Subject: [PATCH 13/23] docs: Add FAQ of why need install rust nightly --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index e1ec07927..52de267ae 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ __WARNING__: This implementation is a proof-of-concept prototype and is not read * [Run multiple node PoA testnet using custom blockchain configuration](#chapter-f21efd) * [Linting](#chapter-c345d7) * [Continuous integration](#chapter-27d8c5) +* [FAQ](#chapter-a0dda5) Note: Generate a new chapter with `openssl rand -hex 3` @@ -479,3 +480,17 @@ Install an [EditorConfig Plugin](https://editorconfig.org/) for your code editor ## Continuous integration * Reference: https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow + +## FAQ + +* Question: Why do we need to install Rust Stable and Rust Nightly? + * Answer: In .github/workflows/rust.yml, we need to run the following, + becuase Substrate builds two binaries: 1) Wasm binary of your Runtime; + and 2) Native executable containing all your other Substrate components + including your runtimes too. The Wasm build requires rust nightly and + wasm32-unknown-unknown to be installed. + ```bash + rustup update nightly + rustup update stable + rustup target add wasm32-unknown-unknown --toolchain nightly + ``` From 781e00577758acc167adcb62c26dac43c07bcaf3 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 11:34:21 +0100 Subject: [PATCH 14/23] test: Update CI to run all integration tests and unit tests --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d516f263a..cfc0d3df2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,10 +60,39 @@ jobs: rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test + # Runs integration tests in the runtime/tests folder + - name: Run Integration Tests across all runtime modules + run: | + cargo test -p node-runtime + + # Runs unit tests in each runtime module of the pallet folder + - name: Run Unit Tests in each runtime module + run: | + cargo test -p roaming-operators && + cargo test -p roaming-networks && + cargo test -p roaming-organizations && + cargo test -p roaming-network-servers && + cargo test -p roaming-devices && + cargo test -p roaming-routing-profiles && + cargo test -p roaming-service-profiles && + cargo test -p roaming-accounting-policies && + cargo test -p roaming-agreement-policies && + cargo test -p roaming-network-profiles && + cargo test -p roaming-device-profiles && + cargo test -p roaming-sessions && + cargo test -p roaming-billing-policies && + cargo test -p roaming-charging-policies && + cargo test -p roaming-packet-bundles && + cargo test -p mining-speed-boosts-configuration-token-mining && + cargo test -p mining-speed-boosts-configuration-hardware-mining && + cargo test -p mining-speed-boosts-rates-token-mining && + cargo test -p mining-speed-boosts-rates-hardware-mining && + cargo test -p mining-speed-boosts-sampling-token-mining && + cargo test -p mining-speed-boosts-sampling-hardware-mining && + cargo test -p mining-speed-boosts-eligibility-token-mining && + cargo test -p mining-speed-boosts-eligibility-hardware-mining && + cargo test -p mining-speed-boosts-claims-token-mining && + cargo test -p mining-speed-boosts-claims-hardware-mining lints: name: Lints From 6e37b47ac97ebacbe874e7a47188538e2bac661f Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 12:08:55 +0100 Subject: [PATCH 15/23] test: Use specific older Rust Nightly version that does not break our build --- .github/workflows/rust.yml | 6 +++--- README.md | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cfc0d3df2..4ec68ba06 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,7 @@ jobs: - name: Initialize WASM build environment run: | - rustup update nightly + rustup toolchain install nightly-2020-02-17 rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly @@ -56,7 +56,7 @@ jobs: - name: Initialize WASM build environment run: | - rustup update nightly + rustup toolchain install nightly-2020-02-17 rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly @@ -119,7 +119,7 @@ jobs: - name: Initialize WASM build environment run: | - rustup update nightly + rustup toolchain install nightly-2020-02-17 rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly diff --git a/README.md b/README.md index 52de267ae..4b541e2d2 100644 --- a/README.md +++ b/README.md @@ -494,3 +494,12 @@ Install an [EditorConfig Plugin](https://editorconfig.org/) for your code editor rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly ``` + +* Question: Why do we install a specific version of Rust Nightly in the CI? + * Answer: Since the latest version of Rust Nightly may break our build, + and because developers may forget to update to the latest version of Rust + Nightly locally. So the solution is to install a specific version of + Rust Nightly in .github/workflows/rust.yml (i.e. + `rustup toolchain install nightly-2020-02-17`), since for example + the latest Rust Nightly version nightly-2020-02-20 may cause our CI tests + to fail (i.e. https://github.com/DataHighway-DHX/node/issues/32) From 0fa9495de74579512b0e783c2382a277fd532e27 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 12:10:46 +0100 Subject: [PATCH 16/23] docs: Update FAQ with CI Rust Nightly info --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4b541e2d2..1232226e4 100644 --- a/README.md +++ b/README.md @@ -485,12 +485,15 @@ Install an [EditorConfig Plugin](https://editorconfig.org/) for your code editor * Question: Why do we need to install Rust Stable and Rust Nightly? * Answer: In .github/workflows/rust.yml, we need to run the following, - becuase Substrate builds two binaries: 1) Wasm binary of your Runtime; + because Substrate builds two binaries: 1) Wasm binary of your Runtime; and 2) Native executable containing all your other Substrate components including your runtimes too. The Wasm build requires rust nightly and - wasm32-unknown-unknown to be installed. + wasm32-unknown-unknown to be installed. Note that we do not use + `rustup update nightly` since the latest Rust Nightly may break our build, + so we must manually change this to the latest Rust Nightly version only + when it is known to work. ```bash - rustup update nightly + rustup toolchain install nightly-2020-02-17 rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly ``` From 9aa7df4c4ef9044b509ca31fff50e33106662835 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 12:41:55 +0100 Subject: [PATCH 17/23] test: Run CI using specific version of Rust Nightly --- .github/workflows/rust.yml | 69 ++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ec68ba06..2ebdf6023 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,9 +25,10 @@ jobs: - name: Initialize WASM build environment run: | - rustup toolchain install nightly-2020-02-17 rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup default nightly + rustup toolchain install nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - name: Run cargo check uses: actions-rs/cargo@v1 @@ -56,43 +57,44 @@ jobs: - name: Initialize WASM build environment run: | - rustup toolchain install nightly-2020-02-17 - rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup update stable + rustup default nightly + rustup toolchain install nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 # Runs integration tests in the runtime/tests folder - name: Run Integration Tests across all runtime modules run: | - cargo test -p node-runtime + cargo +nightly test -p node-runtime # Runs unit tests in each runtime module of the pallet folder - name: Run Unit Tests in each runtime module run: | - cargo test -p roaming-operators && - cargo test -p roaming-networks && - cargo test -p roaming-organizations && - cargo test -p roaming-network-servers && - cargo test -p roaming-devices && - cargo test -p roaming-routing-profiles && - cargo test -p roaming-service-profiles && - cargo test -p roaming-accounting-policies && - cargo test -p roaming-agreement-policies && - cargo test -p roaming-network-profiles && - cargo test -p roaming-device-profiles && - cargo test -p roaming-sessions && - cargo test -p roaming-billing-policies && - cargo test -p roaming-charging-policies && - cargo test -p roaming-packet-bundles && - cargo test -p mining-speed-boosts-configuration-token-mining && - cargo test -p mining-speed-boosts-configuration-hardware-mining && - cargo test -p mining-speed-boosts-rates-token-mining && - cargo test -p mining-speed-boosts-rates-hardware-mining && - cargo test -p mining-speed-boosts-sampling-token-mining && - cargo test -p mining-speed-boosts-sampling-hardware-mining && - cargo test -p mining-speed-boosts-eligibility-token-mining && - cargo test -p mining-speed-boosts-eligibility-hardware-mining && - cargo test -p mining-speed-boosts-claims-token-mining && - cargo test -p mining-speed-boosts-claims-hardware-mining + cargo +nightly test -p roaming-operators && + cargo +nightly test -p roaming-networks && + cargo +nightly test -p roaming-organizations && + cargo +nightly test -p roaming-network-servers && + cargo +nightly test -p roaming-devices && + cargo +nightly test -p roaming-routing-profiles && + cargo +nightly test -p roaming-service-profiles && + cargo +nightly test -p roaming-accounting-policies && + cargo +nightly test -p roaming-agreement-policies && + cargo +nightly test -p roaming-network-profiles && + cargo +nightly test -p roaming-device-profiles && + cargo +nightly test -p roaming-sessions && + cargo +nightly test -p roaming-billing-policies && + cargo +nightly test -p roaming-charging-policies && + cargo +nightly test -p roaming-packet-bundles && + cargo +nightly test -p mining-speed-boosts-configuration-token-mining && + cargo +nightly test -p mining-speed-boosts-configuration-hardware-mining && + cargo +nightly test -p mining-speed-boosts-rates-token-mining && + cargo +nightly test -p mining-speed-boosts-rates-hardware-mining && + cargo +nightly test -p mining-speed-boosts-sampling-token-mining && + cargo +nightly test -p mining-speed-boosts-sampling-hardware-mining && + cargo +nightly test -p mining-speed-boosts-eligibility-token-mining && + cargo +nightly test -p mining-speed-boosts-eligibility-hardware-mining && + cargo +nightly test -p mining-speed-boosts-claims-token-mining && + cargo +nightly test -p mining-speed-boosts-claims-hardware-mining lints: name: Lints @@ -119,9 +121,10 @@ jobs: - name: Initialize WASM build environment run: | - rustup toolchain install nightly-2020-02-17 rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup default nightly + rustup toolchain install nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - name: Run cargo fmt run: cargo +nightly fmt --all -- --check From 07bc2a12cf99dac20278b16e264bad7fab77e449 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 12:46:09 +0100 Subject: [PATCH 18/23] fix indentation --- .github/workflows/rust.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2ebdf6023..f58a65222 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -57,10 +57,10 @@ jobs: - name: Initialize WASM build environment run: | - rustup update stable - rustup default nightly - rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 + rustup update stable + rustup default nightly + rustup toolchain install nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 # Runs integration tests in the runtime/tests folder - name: Run Integration Tests across all runtime modules From 1c816a28e1ea66b98ab48723885834405f1d2df8 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 12:50:10 +0100 Subject: [PATCH 19/23] fix command --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f58a65222..44583d632 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,7 +28,7 @@ jobs: rustup update stable rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly - name: Run cargo check uses: actions-rs/cargo@v1 @@ -60,7 +60,7 @@ jobs: rustup update stable rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly # Runs integration tests in the runtime/tests folder - name: Run Integration Tests across all runtime modules @@ -124,7 +124,7 @@ jobs: rustup update stable rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly - name: Run cargo fmt run: cargo +nightly fmt --all -- --check From f08955dcb7764802a76dc103abe3db87118075e1 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 13:19:14 +0100 Subject: [PATCH 20/23] test: more tweaks to try make it work --- .github/workflows/rust.yml | 71 ++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 44583d632..61eafd265 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,10 +25,11 @@ jobs: - name: Initialize WASM build environment run: | + curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable - rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup default nightly + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - name: Run cargo check uses: actions-rs/cargo@v1 @@ -57,44 +58,45 @@ jobs: - name: Initialize WASM build environment run: | + curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable - rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup default nightly + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 # Runs integration tests in the runtime/tests folder - name: Run Integration Tests across all runtime modules run: | - cargo +nightly test -p node-runtime + cargo +nightly-2020-02-17 test -p node-runtime # Runs unit tests in each runtime module of the pallet folder - name: Run Unit Tests in each runtime module run: | - cargo +nightly test -p roaming-operators && - cargo +nightly test -p roaming-networks && - cargo +nightly test -p roaming-organizations && - cargo +nightly test -p roaming-network-servers && - cargo +nightly test -p roaming-devices && - cargo +nightly test -p roaming-routing-profiles && - cargo +nightly test -p roaming-service-profiles && - cargo +nightly test -p roaming-accounting-policies && - cargo +nightly test -p roaming-agreement-policies && - cargo +nightly test -p roaming-network-profiles && - cargo +nightly test -p roaming-device-profiles && - cargo +nightly test -p roaming-sessions && - cargo +nightly test -p roaming-billing-policies && - cargo +nightly test -p roaming-charging-policies && - cargo +nightly test -p roaming-packet-bundles && - cargo +nightly test -p mining-speed-boosts-configuration-token-mining && - cargo +nightly test -p mining-speed-boosts-configuration-hardware-mining && - cargo +nightly test -p mining-speed-boosts-rates-token-mining && - cargo +nightly test -p mining-speed-boosts-rates-hardware-mining && - cargo +nightly test -p mining-speed-boosts-sampling-token-mining && - cargo +nightly test -p mining-speed-boosts-sampling-hardware-mining && - cargo +nightly test -p mining-speed-boosts-eligibility-token-mining && - cargo +nightly test -p mining-speed-boosts-eligibility-hardware-mining && - cargo +nightly test -p mining-speed-boosts-claims-token-mining && - cargo +nightly test -p mining-speed-boosts-claims-hardware-mining + cargo +nightly-2020-02-17 test -p roaming-operators && + cargo +nightly-2020-02-17 test -p roaming-networks && + cargo +nightly-2020-02-17 test -p roaming-organizations && + cargo +nightly-2020-02-17 test -p roaming-network-servers && + cargo +nightly-2020-02-17 test -p roaming-devices && + cargo +nightly-2020-02-17 test -p roaming-routing-profiles && + cargo +nightly-2020-02-17 test -p roaming-service-profiles && + cargo +nightly-2020-02-17 test -p roaming-accounting-policies && + cargo +nightly-2020-02-17 test -p roaming-agreement-policies && + cargo +nightly-2020-02-17 test -p roaming-network-profiles && + cargo +nightly-2020-02-17 test -p roaming-device-profiles && + cargo +nightly-2020-02-17 test -p roaming-sessions && + cargo +nightly-2020-02-17 test -p roaming-billing-policies && + cargo +nightly-2020-02-17 test -p roaming-charging-policies && + cargo +nightly-2020-02-17 test -p roaming-packet-bundles && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-configuration-token-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-configuration-hardware-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-rates-token-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-rates-hardware-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-sampling-token-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-sampling-hardware-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-eligibility-token-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-eligibility-hardware-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-claims-token-mining && + cargo +nightly-2020-02-17 test -p mining-speed-boosts-claims-hardware-mining lints: name: Lints @@ -121,13 +123,14 @@ jobs: - name: Initialize WASM build environment run: | + curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable - rustup default nightly rustup toolchain install nightly-2020-02-17 - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup default nightly + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - name: Run cargo fmt - run: cargo +nightly fmt --all -- --check + run: cargo +nightly-2020-02-17 fmt --all -- --check - name: Run cargo clippy # uses: actions-rs/cargo@v1 @@ -135,4 +138,4 @@ jobs: # command: clippy # args: --release -- -D warnings # FIXME - temporary fix below. See https://github.com/rust-lang/rust-clippy/issues/5094#issuecomment-579116431 - run: cargo +nightly clippy-preview -Zunstable-options + run: cargo +nightly-2020-02-17 clippy-preview -Zunstable-options From e1c8fe9bb400a70e163c7cba59d5ef6053fc264d Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 13:23:30 +0100 Subject: [PATCH 21/23] remote use of getsubstrate --- .github/workflows/rust.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61eafd265..ba3583f80 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,6 @@ jobs: - name: Initialize WASM build environment run: | - curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable rustup toolchain install nightly-2020-02-17 rustup default nightly @@ -58,7 +57,6 @@ jobs: - name: Initialize WASM build environment run: | - curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable rustup toolchain install nightly-2020-02-17 rustup default nightly @@ -123,7 +121,6 @@ jobs: - name: Initialize WASM build environment run: | - curl https://getsubstrate.io -sSf | bash -s -- --fast rustup update stable rustup toolchain install nightly-2020-02-17 rustup default nightly From 808fd4f47b94d1d1756f44b8b3b83ddf275aabb9 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 14:09:17 +0100 Subject: [PATCH 22/23] test: Try harder.. --- .github/workflows/rust.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ba3583f80..540a0bad0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,13 +27,11 @@ jobs: run: | rustup update stable rustup toolchain install nightly-2020-02-17 - rustup default nightly + rustup default nightly-2020-02-17 rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - name: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check + run: cargo +nightly-2020-02-17 check test: name: Test Suite @@ -59,7 +57,7 @@ jobs: run: | rustup update stable rustup toolchain install nightly-2020-02-17 - rustup default nightly + rustup default nightly-2020-02-17 rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 # Runs integration tests in the runtime/tests folder @@ -119,12 +117,14 @@ jobs: override: true components: rustfmt, clippy + # nightly-2020-02-17-x86_64-unknown-linux-gnu - name: Initialize WASM build environment run: | rustup update stable rustup toolchain install nightly-2020-02-17 - rustup default nightly + rustup default nightly-2020-02-17 rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 + rustup component add rustfmt --toolchain nightly-2020-02-17-x86_64-unknown-linux-gnu - name: Run cargo fmt run: cargo +nightly-2020-02-17 fmt --all -- --check From a34ebfcdc1aa70b78c2a73aafa16923488406d85 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 21 Feb 2020 14:35:28 +0100 Subject: [PATCH 23/23] test: Try fix clippy --- .github/workflows/rust.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 540a0bad0..22282d4be 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -124,10 +124,11 @@ jobs: rustup toolchain install nightly-2020-02-17 rustup default nightly-2020-02-17 rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - rustup component add rustfmt --toolchain nightly-2020-02-17-x86_64-unknown-linux-gnu - name: Run cargo fmt - run: cargo +nightly-2020-02-17 fmt --all -- --check + run: | + rustup component add rustfmt --toolchain nightly-2020-02-17-x86_64-unknown-linux-gnu + cargo +nightly-2020-02-17 fmt --all -- --check - name: Run cargo clippy # uses: actions-rs/cargo@v1 @@ -135,4 +136,7 @@ jobs: # command: clippy # args: --release -- -D warnings # FIXME - temporary fix below. See https://github.com/rust-lang/rust-clippy/issues/5094#issuecomment-579116431 - run: cargo +nightly-2020-02-17 clippy-preview -Zunstable-options + run: | + rustup component add clippy --toolchain nightly-2020-02-17-x86_64-unknown-linux-gnu + rustup component add clippy-preview --toolchain nightly-2020-02-17-x86_64-unknown-linux-gnu + cargo +nightly-2020-02-17 clippy-preview -Zunstable-options