From 370b9e86e31e966a7f105e1b32018d3602d0dec4 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 15 Sep 2021 21:30:16 +0200 Subject: [PATCH] pass sync committee sig consistently in tests There are three defined unit tests for the light client sync protocol. They all follow a similar structure. However, there is an inconcistency how they pass the slot to compute_aggregate_sync_committee_signature. In one instance it is passed as `block.slot`. In the other two cases it is passed as `block_header.slot`. As the `block_header` is created from the `block`, they share the same value. This patch makes the way how the slot is passed consistent across all of the test cases. --- .../pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py b/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py index a3cf8b7ca..c69957de5 100644 --- a/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py +++ b/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py @@ -52,7 +52,7 @@ def test_process_light_client_update_not_updated(spec, state): sync_committee_signature = compute_aggregate_sync_committee_signature( spec, state, - block.slot, + block_header.slot, committee, ) next_sync_committee_branch = [spec.Bytes32() for _ in range(spec.floorlog2(spec.NEXT_SYNC_COMMITTEE_INDEX))]