From 918e58e72ed1b297b1eec65199ee7058620447ee Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 12 Mar 2020 16:21:52 +0100 Subject: [PATCH] fix build --- primitives/phragmen/src/reduce.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/primitives/phragmen/src/reduce.rs b/primitives/phragmen/src/reduce.rs index eb36bb93cfb83..334f49f15c057 100644 --- a/primitives/phragmen/src/reduce.rs +++ b/primitives/phragmen/src/reduce.rs @@ -400,6 +400,7 @@ fn reduce_all(assignments: &mut Vec>) -> u32 let common_count = trailing_common(&voter_root_path, &target_root_path); // because roots are the same. + #[cfg(feature = "std")] debug_assert_eq!( target_root_path.last().unwrap(), voter_root_path.last().unwrap() @@ -421,7 +422,9 @@ fn reduce_all(assignments: &mut Vec>) -> u32 .cloned(), ) .collect::>>(); + // a cycle's length shall always be multiple of two. + #[cfg(feature = "std")] debug_assert_eq!(cycle.len() % 2, 0); // find minimum of cycle.