Commit 8f19f8ab authored by asynchronous rob's avatar asynchronous rob Committed by André Silva
Browse files

use authorities when calculating duty roster (#184)

parent e9402a6c
Pipeline #33635 passed with stages
in 15 minutes and 34 seconds
......@@ -200,7 +200,7 @@ impl<T: Trait> Module<T> {
pub fn calculate_duty_roster() -> DutyRoster {
let parachains = Self::active_parachains();
let parachain_count = parachains.len();
let validator_count = <session::Module<T>>::validator_count() as usize;
let validator_count = <consensus::Module<T>>::authorities().len();
let validators_per_parachain = if parachain_count != 0 { (validator_count - 1) / parachain_count } else { 0 };
let mut roles_val = (0..validator_count).map(|i| match i {
......
......@@ -982,7 +982,7 @@ dependencies = [
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate?rev=45824913c980bb1ba3963f9bba67775a507d8624)",
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
"sr-version 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)",
......@@ -1495,14 +1495,6 @@ dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sr-std"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?rev=45824913c980bb1ba3963f9bba67775a507d8624#45824913c980bb1ba3963f9bba67775a507d8624"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sr-version"
version = "0.1.0"
......@@ -2692,7 +2684,6 @@ dependencies = [
"checksum sr-io 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum sr-std 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum sr-std 0.1.0 (git+https://github.com/paritytech/substrate?rev=45824913c980bb1ba3963f9bba67775a507d8624)" = "<none>"
"checksum sr-version 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment