Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ members = [
"substrate/runtime-sandbox",
"substrate/runtime-std",
"substrate/runtime-support",
"substrate/runtime/balances",
"substrate/runtime/consensus",
"substrate/runtime/contract",
"substrate/runtime/council",
Expand Down
22 changes: 12 additions & 10 deletions demo/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ pub mod error;
use std::sync::Arc;
use demo_primitives::{AccountId, Hash};
use demo_runtime::{Block, BlockId, GenesisConfig,
ConsensusConfig, CouncilConfig, DemocracyConfig, SessionConfig, StakingConfig,
TimestampConfig};
BalancesConfig, ConsensusConfig, CouncilConfig, DemocracyConfig, SessionConfig,
StakingConfig, TimestampConfig};
use futures::{Future, Sink, Stream};
use tokio::runtime::Runtime;
use demo_executor::NativeExecutor;
Expand Down Expand Up @@ -164,24 +164,26 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
authorities: vec![god_key.clone().into()],
}),
system: None,
session: Some(SessionConfig {
validators: vec![god_key.clone().into()],
session_length: 720, // that's 1 hour per session.
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: vec![],
balances: Some(BalancesConfig {
transaction_base_fee: 100,
transaction_byte_fee: 1,
transfer_fee: 0,
creation_fee: 0,
reclaim_rebate: 0,
existential_deposit: 500,
balances: vec![(god_key.clone().into(), 1u64 << 63)].into_iter().collect(),
}),
session: Some(SessionConfig {
validators: vec![god_key.clone().into()],
session_length: 720, // that's 1 hour per session.
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: vec![],
validator_count: 12,
minimum_validator_count: 4,
sessions_per_era: 24, // 24 hours per era.
bonding_duration: 90, // 90 days per bond.
bonding_duration: 90 * 24 * 720, // 90 days per bond.
early_era_slash: 10000,
session_reward: 100,
offline_slash_grace: 0,
Expand Down
1 change: 1 addition & 0 deletions demo/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ demo-runtime = { path = "../runtime" }
[dev-dependencies]
substrate-keyring = { path = "../../substrate/keyring" }
substrate-runtime-primitives = { path = "../../substrate/runtime/primitives" }
substrate-runtime-balances = { path = "../../substrate/runtime/balances" }
substrate-runtime-session = { path = "../../substrate/runtime/session" }
substrate-runtime-staking = { path = "../../substrate/runtime/staking" }
substrate-runtime-system = { path = "../../substrate/runtime/system" }
Expand Down
Loading