Add message to assert in attesters

This commit is contained in:
Paul Hauner 2018-07-20 17:48:29 +10:00
parent ac0546baa0
commit 1cf1682a9b

View File

@ -79,7 +79,10 @@ pub fn process_attestations(
let mut key_msg_tuples: Vec<(&PublicKey, &[u8])> = vec![];
let mut attesters: Vec<usize> = vec![];
assert_eq!(attestation_indicies.len(), attestation_bitfield.len());
assert_eq!(
attestation_indicies.len(), attestation_bitfield.len(),
"Bitfield length does not match required attestors."
);
for (bitfield_bit, validators_index) in attestation_indicies.iter().enumerate() {
if attestation_bitfield.get_bit(&bitfield_bit) {
key_msg_tuples.push(