mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-02 22:03:37 +00:00
Fix: use TypeVar for "point" rather than bytes
This commit is contained in:
parent
bd48cefdd7
commit
a526cdf446
@ -17,6 +17,7 @@ from eth2spec.capella import {preset_name} as capella
|
||||
def preparations(cls):
|
||||
return '''
|
||||
T = TypeVar('T') # For generic function
|
||||
TPoint = TypeVar('TPoint') # For generic function. G1 or G2 point.
|
||||
'''
|
||||
|
||||
@classmethod
|
||||
|
@ -153,8 +153,8 @@ def bit_reversal_permutation(sequence: Sequence[T]) -> Sequence[T]:
|
||||
This function performs a multi-scalar multiplication between `points` and `integers`. `points` can either be in G1 or G2.
|
||||
|
||||
```python
|
||||
def multi_exp(points: PyUnion[Sequence[G1Point], Sequence[G2Point]],
|
||||
integers: Sequence[uint64]) -> PyUnion[Sequence[G1Point], Sequence[G2Point]]:
|
||||
def multi_exp(points: Sequence[TPoint],
|
||||
integers: Sequence[uint64]) -> Sequence[TPoint]:
|
||||
# pylint: disable=unused-argument
|
||||
...
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user