Fix typo and remove unused variable

This commit is contained in:
Hsiao-Wei Wang 2020-05-15 01:17:11 +08:00
parent d27f2350a2
commit 9a2559857c
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 6 additions and 2 deletions

View File

@ -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: