Add per-epoch benchmarks, optimise function.

This commit is contained in:
Paul Hauner
2019-03-09 10:37:41 +11:00
parent ddac7540bc
commit 63743a962c
10 changed files with 670 additions and 159 deletions

View File

@@ -11,7 +11,7 @@ pub fn verify_bitfield_length(bitfield: &Bitfield, committee_size: usize) -> boo
}
for i in committee_size..(bitfield.num_bytes() * 8) {
if bitfield.get(i).expect("Impossible due to previous check.") {
if bitfield.get(i).unwrap_or(false) {
return false;
}
}