Fixes bug with attestation validation that arose from change to API

This commit is contained in:
Alex Stokes
2018-12-10 20:33:43 -08:00
parent 4d43de1cea
commit 1ffd9e10b3

View File

@@ -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);
}