Skip to content
Snippets Groups Projects
Commit c1ec4bd8 authored by asynchronous rob's avatar asynchronous rob Committed by André Silva
Browse files

use authorities when calculating duty roster (#184)

parent 454ddf89
Branches
No related merge requests found
......@@ -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>"
......
No preview for this file type
No preview for this file type
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