From 9011168ee117fdf42483fdc294f19ff5fc2fa593 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Sat, 24 Aug 2019 12:04:16 +0200 Subject: [PATCH] Fix up bonding period. (#396) --- polkadot/runtime/src/lib.rs | 4 +++- polkadot/runtime/src/parachains.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/polkadot/runtime/src/lib.rs b/polkadot/runtime/src/lib.rs index 73df55cc43..54562b1f87 100644 --- a/polkadot/runtime/src/lib.rs +++ b/polkadot/runtime/src/lib.rs @@ -278,8 +278,10 @@ impl session::historical::Trait for Runtime { } parameter_types! { + // Six sessions in an era (24 hours). pub const SessionsPerEra: SessionIndex = 6; - pub const BondingDuration: staking::EraIndex = 24 * 28; + // 28 eras for unbonding (28 days). + pub const BondingDuration: staking::EraIndex = 28; } impl staking::Trait for Runtime { diff --git a/polkadot/runtime/src/parachains.rs b/polkadot/runtime/src/parachains.rs index f0a33f6af7..939132cd4d 100644 --- a/polkadot/runtime/src/parachains.rs +++ b/polkadot/runtime/src/parachains.rs @@ -1005,7 +1005,7 @@ mod tests { parameter_types! { pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6; - pub const BondingDuration: staking::EraIndex = 24 * 28; + pub const BondingDuration: staking::EraIndex = 28; pub const AttestationPeriod: BlockNumber = 100; }