Fix bitfield setting in block val. test

This commit is contained in:
Paul Hauner 2018-09-25 23:34:25 +10:00
parent e1e494b9aa
commit 177c04dc1a
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -115,7 +115,9 @@ fn test_block_validation() {
canonical_hash(&bytes)
};
for _ in 0..validators_per_shard {
for attestation_index in 0..validators_per_shard {
/*
* Add the attester to the attestation indices for this shard.
*/
@ -123,7 +125,7 @@ fn test_block_validation() {
/*
* Set the voters bit on the bitfield to true.
*/
attester_bitfield.set_bit(i, true);
attester_bitfield.set_bit(attestation_index, true);
/*
* Generate a random keypair for this validatior and clone it into the
* list of keypairs.