mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 23:19:28 +00:00
Apply PR feedback: add docstring
This commit is contained in:
parent
aa436d91b2
commit
f0c4623871
@ -642,6 +642,10 @@ def is_winning_attestation(state: BeaconState,
|
||||
def optional_aggregate_verify(pubkeys: Sequence[BLSPubkey],
|
||||
messages: Sequence[Bytes32],
|
||||
signature: BLSSignature) -> bool:
|
||||
"""
|
||||
If ``pubkeys`` is an empty list, the given ``signature`` should be a stub ``NO_SIGNATURE``.
|
||||
Otherwise, verify it with standard BLS AggregateVerify API.
|
||||
"""
|
||||
if len(pubkeys) == 0:
|
||||
return signature == NO_SIGNATURE
|
||||
else:
|
||||
@ -652,6 +656,10 @@ def optional_aggregate_verify(pubkeys: Sequence[BLSPubkey],
|
||||
|
||||
```python
|
||||
def optional_fast_aggregate_verify(pubkeys: Sequence[BLSPubkey], message: Bytes32, signature: BLSSignature) -> bool:
|
||||
"""
|
||||
If ``pubkeys`` is an empty list, the given ``signature`` should be a stub ``NO_SIGNATURE``.
|
||||
Otherwise, verify it with standard BLS FastAggregateVerify API.
|
||||
"""
|
||||
if len(pubkeys) == 0:
|
||||
return signature == NO_SIGNATURE
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user