From 9a2559857cc862fe42940f1fcb0de3df28b82845 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 15 May 2020 01:17:11 +0800 Subject: [PATCH] Fix typo and remove unused variable --- tests/generators/bls/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/generators/bls/main.py b/tests/generators/bls/main.py index f97be3c90..092f1247b 100644 --- a/tests/generators/bls/main.py +++ b/tests/generators/bls/main.py @@ -15,6 +15,7 @@ from hashlib import sha256 from eth2spec.test.context import PHASE0 + def hash(x): return sha256(x).digest() @@ -44,11 +45,11 @@ PRIVKEYS = [ hex_to_int('0x00000000000000000000000000000000328388aff0d4a5b7dc9205abd374e7e98f3cd9f3418edb4eafda5fb16473d216'), ] -NO_PUBKEY = b'\x00' * 48 Z1_PUBKEY = b'\xc0' + b'\x00' * 47 NO_SIGNATURE = b'\x00' * 96 Z2_SIGNATURE = b'\xc0' + b'\x00' * 95 + def case01_sign(): for privkey in PRIVKEYS: for message in MESSAGES: @@ -117,6 +118,7 @@ def case02_verify(): 'output': True, } + def case03_aggregate(): for message in MESSAGES: sigs = [bls.Sign(privkey, message) for privkey in PRIVKEYS] @@ -195,6 +197,7 @@ def case04_fast_aggregate_verify(): 'output': False, } + def case05_aggregate_verify(): pubekys = [] pubkeys_serial = [] @@ -237,7 +240,7 @@ def case05_aggregate_verify(): yield f'aggregate_verify_na_pubkeys_and_infinity_signature', { 'input': { 'pubkeys': [], - 'message': [], + 'messages': [], 'signature': encode_hex(Z2_SIGNATURE), }, 'output': False, @@ -254,6 +257,7 @@ def case05_aggregate_verify(): 'output': False, } + def create_provider(handler_name: str, test_case_fn: Callable[[], Iterable[Tuple[str, Dict[str, Any]]]]) -> gen_typing.TestProvider: