Fix typo and remove unused variable
This commit is contained in:
parent
d27f2350a2
commit
9a2559857c
|
@ -15,6 +15,7 @@ from hashlib import sha256
|
||||||
|
|
||||||
from eth2spec.test.context import PHASE0
|
from eth2spec.test.context import PHASE0
|
||||||
|
|
||||||
|
|
||||||
def hash(x):
|
def hash(x):
|
||||||
return sha256(x).digest()
|
return sha256(x).digest()
|
||||||
|
|
||||||
|
@ -44,11 +45,11 @@ PRIVKEYS = [
|
||||||
hex_to_int('0x00000000000000000000000000000000328388aff0d4a5b7dc9205abd374e7e98f3cd9f3418edb4eafda5fb16473d216'),
|
hex_to_int('0x00000000000000000000000000000000328388aff0d4a5b7dc9205abd374e7e98f3cd9f3418edb4eafda5fb16473d216'),
|
||||||
]
|
]
|
||||||
|
|
||||||
NO_PUBKEY = b'\x00' * 48
|
|
||||||
Z1_PUBKEY = b'\xc0' + b'\x00' * 47
|
Z1_PUBKEY = b'\xc0' + b'\x00' * 47
|
||||||
NO_SIGNATURE = b'\x00' * 96
|
NO_SIGNATURE = b'\x00' * 96
|
||||||
Z2_SIGNATURE = b'\xc0' + b'\x00' * 95
|
Z2_SIGNATURE = b'\xc0' + b'\x00' * 95
|
||||||
|
|
||||||
|
|
||||||
def case01_sign():
|
def case01_sign():
|
||||||
for privkey in PRIVKEYS:
|
for privkey in PRIVKEYS:
|
||||||
for message in MESSAGES:
|
for message in MESSAGES:
|
||||||
|
@ -117,6 +118,7 @@ def case02_verify():
|
||||||
'output': True,
|
'output': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def case03_aggregate():
|
def case03_aggregate():
|
||||||
for message in MESSAGES:
|
for message in MESSAGES:
|
||||||
sigs = [bls.Sign(privkey, message) for privkey in PRIVKEYS]
|
sigs = [bls.Sign(privkey, message) for privkey in PRIVKEYS]
|
||||||
|
@ -195,6 +197,7 @@ def case04_fast_aggregate_verify():
|
||||||
'output': False,
|
'output': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def case05_aggregate_verify():
|
def case05_aggregate_verify():
|
||||||
pubekys = []
|
pubekys = []
|
||||||
pubkeys_serial = []
|
pubkeys_serial = []
|
||||||
|
@ -237,7 +240,7 @@ def case05_aggregate_verify():
|
||||||
yield f'aggregate_verify_na_pubkeys_and_infinity_signature', {
|
yield f'aggregate_verify_na_pubkeys_and_infinity_signature', {
|
||||||
'input': {
|
'input': {
|
||||||
'pubkeys': [],
|
'pubkeys': [],
|
||||||
'message': [],
|
'messages': [],
|
||||||
'signature': encode_hex(Z2_SIGNATURE),
|
'signature': encode_hex(Z2_SIGNATURE),
|
||||||
},
|
},
|
||||||
'output': False,
|
'output': False,
|
||||||
|
@ -254,6 +257,7 @@ def case05_aggregate_verify():
|
||||||
'output': False,
|
'output': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def create_provider(handler_name: str,
|
def create_provider(handler_name: str,
|
||||||
test_case_fn: Callable[[], Iterable[Tuple[str, Dict[str, Any]]]]) -> gen_typing.TestProvider:
|
test_case_fn: Callable[[], Iterable[Tuple[str, Dict[str, Any]]]]) -> gen_typing.TestProvider:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue