mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-05 22:25:29 -05:00
lint
This commit is contained in:
@@ -11,7 +11,7 @@ def run_on_attestation(spec, state, store, attestation, valid=True):
|
||||
if not valid:
|
||||
try:
|
||||
spec.on_attestation(store, attestation)
|
||||
except:
|
||||
except AssertionError:
|
||||
return
|
||||
else:
|
||||
assert False
|
||||
@@ -131,4 +131,4 @@ def test_on_attestation_invalid_attestation(spec, state):
|
||||
attestation = get_valid_attestation(spec, state, slot=block.slot)
|
||||
# make attestation invalid
|
||||
attestation.custody_bitfield = b'\xf0' + attestation.custody_bitfield[1:]
|
||||
run_on_attestation(spec, state, store, attestation, False)
|
||||
run_on_attestation(spec, state, store, attestation, False)
|
||||
|
||||
@@ -9,7 +9,7 @@ def run_on_block(spec, state, store, block, valid=True):
|
||||
if not valid:
|
||||
try:
|
||||
spec.on_block(store, block)
|
||||
except:
|
||||
except AssertionError:
|
||||
return
|
||||
else:
|
||||
assert False
|
||||
@@ -88,8 +88,11 @@ def test_on_block_before_finalized(spec, state):
|
||||
time = 100
|
||||
spec.on_tick(store, time)
|
||||
|
||||
store.finalized_checkpoint = spec.Checkpoint(epoch=store.finalized_checkpoint.epoch + 2, root=store.finalized_checkpoint.root)
|
||||
store.finalized_checkpoint = spec.Checkpoint(
|
||||
epoch=store.finalized_checkpoint.epoch + 2,
|
||||
root=store.finalized_checkpoint.root
|
||||
)
|
||||
|
||||
# Fail receiving block of `GENESIS_SLOT + 1` slot
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
run_on_block(spec, state, store, block, False)
|
||||
run_on_block(spec, state, store, block, False)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Reference in New Issue
Block a user