From 177c04dc1a21a4f6acc42ea0f3496630c3619491 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 25 Sep 2018 23:34:25 +1000 Subject: [PATCH] Fix bitfield setting in block val. test --- lighthouse/state/block/validation/tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lighthouse/state/block/validation/tests.rs b/lighthouse/state/block/validation/tests.rs index c9e512bfc..03eaf982e 100644 --- a/lighthouse/state/block/validation/tests.rs +++ b/lighthouse/state/block/validation/tests.rs @@ -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.