Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge branch 'gav-composite-account' into gav-lazy-reaping
Browse files Browse the repository at this point in the history
  • Loading branch information
gavofyork committed Feb 13, 2020
2 parents 349a7be + e424b22 commit 6622d40
Show file tree
Hide file tree
Showing 72 changed files with 2,322 additions and 1,764 deletions.
206 changes: 145 additions & 61 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use sp_std::prelude::*;
use sp_core::OpaqueMetadata;
use sp_runtime::{
ApplyExtrinsicResult, transaction_validity::TransactionValidity, generic, create_runtime_str,
impl_opaque_keys, MultiSignature
impl_opaque_keys, MultiSignature,
};
use sp_runtime::traits::{
BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount
Expand Down
33 changes: 28 additions & 5 deletions bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,17 @@ pub fn testnet_genesis(
}),
pallet_democracy: Some(DemocracyConfig::default()),
pallet_collective_Instance1: Some(CouncilConfig {
members: endowed_accounts.iter().cloned()
.collect::<Vec<_>>()[..(num_endowed_accounts + 1) / 2].to_vec(),
members: endowed_accounts.iter()
.take((num_endowed_accounts + 1) / 2)
.cloned()
.collect(),
phantom: Default::default(),
}),
pallet_collective_Instance2: Some(TechnicalCommitteeConfig {
members: endowed_accounts.iter().cloned()
.collect::<Vec<_>>()[..(num_endowed_accounts + 1) / 2].to_vec(),
members: endowed_accounts.iter()
.take((num_endowed_accounts + 1) / 2)
.cloned()
.collect(),
phantom: Default::default(),
}),
pallet_contracts: Some(ContractsConfig {
Expand Down Expand Up @@ -293,7 +297,10 @@ pub fn testnet_genesis(
pallet_membership_Instance1: Some(Default::default()),
pallet_treasury: Some(Default::default()),
pallet_society: Some(SocietyConfig {
members: endowed_accounts[0..3].to_vec(),
members: endowed_accounts.iter()
.take((num_endowed_accounts + 1) / 2)
.cloned()
.collect(),
pot: 0,
max_members: 999,
}),
Expand Down Expand Up @@ -357,6 +364,7 @@ pub(crate) mod tests {
use super::*;
use crate::service::{new_full, new_light};
use sc_service_test;
use sp_runtime::BuildStorage;

fn local_testnet_genesis_instant_single() -> GenesisConfig {
testnet_genesis(
Expand Down Expand Up @@ -406,4 +414,19 @@ pub(crate) mod tests {
|config| new_light(config),
);
}

#[test]
fn test_create_development_chain_spec() {
development_config().build_storage().unwrap();
}

#[test]
fn test_create_local_testnet_chain_spec() {
local_testnet_config().build_storage().unwrap();
}

#[test]
fn test_staging_test_net_chain_spec() {
staging_testnet_config().build_storage().unwrap();
}
}
9 changes: 5 additions & 4 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ use frame_support::{
traits::{SplitTwoWays, Currency, Randomness},
};
use sp_core::u32_trait::{_1, _2, _3, _4};
use node_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature};
pub use node_primitives::{AccountId, Signature};
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
use sp_api::impl_runtime_apis;
use sp_runtime::{
Permill, Perbill, Percent, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str,
BenchmarkResults,
Permill, Perbill, Percent, ApplyExtrinsicResult, BenchmarkResults,
impl_opaque_keys, generic, create_runtime_str,
};
use sp_runtime::curve::PiecewiseLinear;
use sp_runtime::transaction_validity::TransactionValidity;
Expand Down Expand Up @@ -81,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 217,
spec_version: 218,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
Expand Down
24 changes: 23 additions & 1 deletion bin/node/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ license = "GPL-3.0"
[dependencies]
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
sc-client = { version = "0.8", path = "../../../client/" }
sc-client-db = { version = "0.8", path = "../../../client/db/", features = ["kvdb-rocksdb"] }
sc-client-api = { version = "2.0", path = "../../../client/api/" }
codec = { package = "parity-scale-codec", version = "1.0.0" }
pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
Expand All @@ -24,10 +26,30 @@ pallet-session = { version = "2.0.0", path = "../../../frame/session" }
pallet-society = { version = "2.0.0", path = "../../../frame/society" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
pallet-staking = { version = "2.0.0", path = "../../../frame/staking" }
sc-executor = { version = "0.8", path = "../../../client/executor" }
sc-executor = { version = "0.8", path = "../../../client/executor", features = ["wasmtime"] }
sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" }
frame-system = { version = "2.0.0", path = "../../../frame/system" }
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
wabt = "0.9.2"
sp-api = { version = "2.0.0", path = "../../../primitives/api" }
sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
log = "0.4.8"

[dev-dependencies]
criterion = "0.3.0"
tempdir = "0.3"
fs_extra = "1"
hex-literal = "0.2.1"
sc-cli = { version = "0.8.0", path = "../../../client/cli" }
sc-service = { version = "0.8.0", path = "../../../client/service", features = ["rocksdb"] }

[[bench]]
name = "import"
harness = false
Loading

0 comments on commit 6622d40

Please sign in to comment.