From 1ffd9e10b3215f897eec3bb9a17bdf45070f6ae7 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 10 Dec 2018 20:33:43 -0800 Subject: [PATCH] Fixes bug with attestation validation that arose from change to API --- beacon_chain/validation/src/attestation_validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/validation/src/attestation_validation.rs b/beacon_chain/validation/src/attestation_validation.rs index 4953a92c3..5d45bfcd2 100644 --- a/beacon_chain/validation/src/attestation_validation.rs +++ b/beacon_chain/validation/src/attestation_validation.rs @@ -135,7 +135,7 @@ where * Allow extra set bits would permit mutliple different byte layouts (and therefore hashes) to * refer to the same AttesationRecord. */ - if a.attester_bitfield.len() > attestation_indices.len() { + if a.attester_bitfield.num_set_bits() > attestation_indices.len() { return Err(AttestationValidationError::InvalidBitfieldEndBits); }