mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-01 13:34:57 -05:00
Add test_config_invariants
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from eth2spec.test.context import spec_test, with_whisk_and_later
|
||||
from eth2spec.test.context import single_phase
|
||||
|
||||
|
||||
# Note: remove once whisk is rebased on top of deneb
|
||||
def is_power_of_two(value: int) -> bool:
|
||||
"""
|
||||
Check if ``value`` is a power of two integer.
|
||||
"""
|
||||
return (value > 0) and (value & (value - 1) == 0)
|
||||
|
||||
|
||||
@with_whisk_and_later
|
||||
@spec_test
|
||||
@single_phase
|
||||
def test_curdleproof(spec):
|
||||
assert is_power_of_two(spec.CURDLEPROOFS_N_BLINDERS + spec.WHISK_VALIDATORS_PER_SHUFFLE)
|
||||
Reference in New Issue
Block a user