`ceillog2` accepts positive integers now
This commit is contained in:
parent
6df35fc3b5
commit
a380f3e1b1
4
setup.py
4
setup.py
|
@ -152,7 +152,9 @@ GeneralizedIndex = NewType('GeneralizedIndex', int)
|
|||
SSZObject = TypeVar('SSZObject', bound=View)
|
||||
'''
|
||||
SUNDRY_CONSTANTS_FUNCTIONS = '''
|
||||
def ceillog2(x: uint64) -> uint64:
|
||||
def ceillog2(x: int) -> uint64:
|
||||
if x < 1:
|
||||
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
|
||||
return uint64((x - 1).bit_length())
|
||||
'''
|
||||
PHASE0_SUNDRY_FUNCTIONS = '''
|
||||
|
|
Loading…
Reference in New Issue