diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d516f263a..22282d4be 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,14 +25,13 @@ jobs: - name: Initialize WASM build environment run: | - rustup update nightly rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup toolchain install nightly-2020-02-17 + 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 @@ -56,14 +55,44 @@ jobs: - name: Initialize WASM build environment run: | - rustup update nightly rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup toolchain install nightly-2020-02-17 + rustup default nightly-2020-02-17 + rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-17 - - 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 +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-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 @@ -88,14 +117,18 @@ jobs: override: true components: rustfmt, clippy + # nightly-2020-02-17-x86_64-unknown-linux-gnu - name: Initialize WASM build environment run: | - rustup update nightly rustup update stable - rustup target add wasm32-unknown-unknown --toolchain nightly + rustup toolchain install nightly-2020-02-17 + rustup default 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 + 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 @@ -103,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 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 diff --git a/README.md b/README.md index 8ca9b3b8d..1232226e4 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` @@ -319,6 +320,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 ``` @@ -452,7 +460,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 @@ -472,3 +480,29 @@ 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, + 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. 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 toolchain install nightly-2020-02-17 + 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) 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..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 @@ -464,6 +464,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -479,17 +480,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -552,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; @@ -563,7 +567,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 f5fdca0d9..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 @@ -563,6 +563,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -578,17 +579,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -651,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; @@ -662,7 +666,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 d102f109c..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 @@ -428,6 +428,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -443,17 +444,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -484,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; @@ -495,7 +499,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 9117a12dd..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 @@ -491,6 +491,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -506,17 +507,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -545,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; @@ -556,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/eligibility/hardware-mining/src/lib.rs b/pallets/mining/mining-speed-boosts/eligibility/hardware-mining/src/lib.rs index 04eb4efde..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 @@ -650,6 +650,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -665,17 +666,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -732,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; @@ -743,7 +747,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 a886af686..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 @@ -642,6 +642,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -657,17 +658,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -722,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; @@ -733,7 +737,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 2bb451adb..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 @@ -350,6 +350,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -365,17 +366,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -399,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; @@ -410,7 +414,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 2663c1602..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 @@ -375,6 +375,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -390,17 +391,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -426,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; @@ -437,7 +441,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 b20f78648..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 @@ -450,6 +450,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -465,17 +466,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -515,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; @@ -526,7 +530,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 a060daae4..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 @@ -442,6 +442,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -457,17 +458,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -505,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; @@ -516,7 +520,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 094e35316..62861c89d 100644 --- a/pallets/roaming/roaming-accounting-policies/src/lib.rs +++ b/pallets/roaming/roaming-accounting-policies/src/lib.rs @@ -410,6 +410,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -438,6 +439,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -453,17 +455,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -490,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; @@ -501,7 +506,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 de379d2a6..792263a93 100644 --- a/pallets/roaming/roaming-agreement-policies/src/lib.rs +++ b/pallets/roaming/roaming-agreement-policies/src/lib.rs @@ -487,6 +487,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -515,6 +516,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -530,17 +532,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -574,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; @@ -585,7 +590,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 5fd98fc91..f3762d3aa 100644 --- a/pallets/roaming/roaming-billing-policies/src/lib.rs +++ b/pallets/roaming/roaming-billing-policies/src/lib.rs @@ -462,6 +462,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -490,6 +491,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -505,17 +507,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -541,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; @@ -552,7 +557,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 851e18255..8f0d5896e 100644 --- a/pallets/roaming/roaming-charging-policies/src/lib.rs +++ b/pallets/roaming/roaming-charging-policies/src/lib.rs @@ -475,6 +475,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -503,6 +504,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -518,17 +520,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -554,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; @@ -565,7 +570,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 1ec4f9da9..54ce129be 100644 --- a/pallets/roaming/roaming-device-profiles/src/lib.rs +++ b/pallets/roaming/roaming-device-profiles/src/lib.rs @@ -399,6 +399,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -427,6 +428,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -442,17 +444,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -492,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; @@ -503,7 +508,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 b59e27ee2..90a85763d 100644 --- a/pallets/roaming/roaming-devices/src/lib.rs +++ b/pallets/roaming/roaming-devices/src/lib.rs @@ -377,6 +377,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -405,6 +406,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -420,17 +422,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -462,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; @@ -473,7 +478,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 cec73ef95..f1d40e18d 100644 --- a/pallets/roaming/roaming-network-profiles/src/lib.rs +++ b/pallets/roaming/roaming-network-profiles/src/lib.rs @@ -757,6 +757,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -785,6 +786,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -800,17 +802,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -846,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; @@ -857,7 +862,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 dbf423f7e..cada31fe2 100644 --- a/pallets/roaming/roaming-network-servers/src/lib.rs +++ b/pallets/roaming/roaming-network-servers/src/lib.rs @@ -374,6 +374,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -402,6 +403,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -417,17 +419,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -451,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; @@ -462,7 +467,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 95c32b0c6..cd338d708 100644 --- a/pallets/roaming/roaming-networks/src/lib.rs +++ b/pallets/roaming/roaming-networks/src/lib.rs @@ -286,6 +286,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -314,6 +315,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -329,17 +331,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -359,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; @@ -370,7 +375,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 8b45b9515..36eb9f029 100644 --- a/pallets/roaming/roaming-operators/src/lib.rs +++ b/pallets/roaming/roaming-operators/src/lib.rs @@ -211,6 +211,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -239,6 +240,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -254,17 +256,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -280,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; @@ -291,7 +296,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 5c9045277..55fce5d28 100644 --- a/pallets/roaming/roaming-organizations/src/lib.rs +++ b/pallets/roaming/roaming-organizations/src/lib.rs @@ -305,6 +305,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -333,6 +334,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -348,17 +350,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -386,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; @@ -397,7 +402,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 e77fa109a..fa1470d29 100644 --- a/pallets/roaming/roaming-packet-bundles/src/lib.rs +++ b/pallets/roaming/roaming-packet-bundles/src/lib.rs @@ -639,6 +639,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -667,6 +668,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -682,17 +684,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -741,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; @@ -752,7 +757,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 e178dc895..dd32b794e 100644 --- a/pallets/roaming/roaming-routing-profiles/src/lib.rs +++ b/pallets/roaming/roaming-routing-profiles/src/lib.rs @@ -282,6 +282,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -310,6 +311,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -325,17 +327,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -372,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; @@ -383,7 +388,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 66ee10534..00f4d858a 100644 --- a/pallets/roaming/roaming-service-profiles/src/lib.rs +++ b/pallets/roaming/roaming-service-profiles/src/lib.rs @@ -318,6 +318,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -346,6 +347,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -361,17 +363,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -402,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; @@ -414,7 +419,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 d2fb54882..5f6d7e9a7 100644 --- a/pallets/roaming/roaming-sessions/src/lib.rs +++ b/pallets/roaming/roaming-sessions/src/lib.rs @@ -493,6 +493,7 @@ mod tests { use super::*; use frame_support::{ + assert_noop, assert_ok, impl_outer_origin, parameter_types, @@ -521,6 +522,7 @@ mod tests { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl system::Trait for Test { + type AccountData = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -536,17 +538,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -585,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; @@ -596,7 +601,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 e220f045d..9fe29e073 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 = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -86,17 +87,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -159,7 +163,7 @@ mod tests { type MiningSpeedBoostClaimsHardwareMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationHardwareMiningTestModule = MiningSpeedBoostConfigurationHardwareMiningModule; @@ -175,7 +179,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 d48bf2a8e..f381274ab 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 = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -86,17 +87,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -159,7 +163,7 @@ mod tests { type MiningSpeedBoostClaimsTokenMiningIndex = u64; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type MiningSpeedBoostConfigurationTokenMiningTestModule = MiningSpeedBoostConfigurationTokenMiningModule; type MiningSpeedBoostRatesTokenMiningTestModule = MiningSpeedBoostRatesTokenMiningModule; @@ -174,7 +178,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 ffd7994e9..fe5af139b 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 = balances::AccountData; type AccountId = u64; type AvailableBlockRatio = AvailableBlockRatio; type BlockHashCount = BlockHashCount; @@ -128,17 +129,20 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type MaximumBlockWeight = MaximumBlockWeight; type ModuleToIndex = (); + type OnNewAccount = (); + 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 CreationFee = (); type DustRemoval = (); type Event = (); - type ExistentialDeposit = (); - type OnNewAccount = (); - type TransferPayment = (); + type ExistentialDeposit = ExistentialDeposit; } impl transaction_payment::Trait for Test { type Currency = Balances; @@ -219,7 +223,7 @@ mod tests { type RoamingDeviceProfileVendorID = Vec; } - // type System = system::Module; + type System = system::Module; type Balances = balances::Module; type RoamingOperatorTestModule = RoamingOperatorModule; type RoamingNetworkTestModule = RoamingNetworkModule; @@ -242,7 +246,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();