mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 14:45:04 -05:00
@@ -262,7 +262,7 @@ def test_att1_duplicate_index_normal_signed(spec, state):
|
||||
indices.pop(1) # remove an index, make room for the additional duplicate index.
|
||||
attester_slashing.attestation_1.attesting_indices = sorted(indices)
|
||||
|
||||
# sign it, the signature will be valid for a single occurence. If the transition accidentally ignores the duplicate.
|
||||
# The signature will be valid for a single occurrence. If the transition accidentally ignores the duplicate.
|
||||
sign_indexed_attestation(spec, state, attester_slashing.attestation_1)
|
||||
|
||||
indices.append(indices[0]) # add one of the indices a second time
|
||||
@@ -282,7 +282,7 @@ def test_att2_duplicate_index_normal_signed(spec, state):
|
||||
indices.pop(2) # remove an index, make room for the additional duplicate index.
|
||||
attester_slashing.attestation_2.attesting_indices = sorted(indices)
|
||||
|
||||
# sign it, the signature will be valid for a single occurence. If the transition accidentally ignores the duplicate.
|
||||
# The signature will be valid for a single occurrence. If the transition accidentally ignores the duplicate.
|
||||
sign_indexed_attestation(spec, state, attester_slashing.attestation_2)
|
||||
|
||||
indices.append(indices[1]) # add one of the indices a second time
|
||||
|
||||
@@ -155,7 +155,7 @@ def test_duplicate_attestation(spec, state):
|
||||
next_epoch(spec, single_state)
|
||||
next_epoch(spec, dup_state)
|
||||
|
||||
# Run non-duplicate inclusion rewards for comparision. Do not yield test vectors
|
||||
# Run non-duplicate inclusion rewards for comparison. Do not yield test vectors
|
||||
for _ in run_process_rewards_and_penalties(spec, single_state):
|
||||
pass
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ def test_invalid_state_root(spec, state):
|
||||
|
||||
expect_assertion_error(lambda: spec.state_transition(state, signed_block))
|
||||
|
||||
yield 'blocks', [block]
|
||||
yield 'blocks', [signed_block]
|
||||
yield 'post', None
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ def test_invalid_state_root(spec, state):
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_zero_block_sig(spec, state):
|
||||
yield 'pre', state
|
||||
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
invalid_signed_block = spec.SignedBeaconBlock(message=block)
|
||||
expect_assertion_error(lambda: spec.state_transition(state, invalid_signed_block))
|
||||
@@ -103,6 +105,8 @@ def test_zero_block_sig(spec, state):
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_invalid_block_sig(spec, state):
|
||||
yield 'pre', state
|
||||
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
invalid_signed_block = spec.SignedBeaconBlock(
|
||||
message=block,
|
||||
|
||||
Reference in New Issue
Block a user