Fix Capella fork test assertions

This commit is contained in:
Hsiao-Wei Wang 2023-01-27 11:00:37 +01:00
parent 902a9c9967
commit 7b5acbfd21
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
2 changed files with 2 additions and 4 deletions

View File

@ -242,7 +242,7 @@ class BeaconState(Container):
current_sync_committee: SyncCommittee
next_sync_committee: SyncCommittee
# Execution
latest_execution_payload_header: ExecutionPayloadHeader
latest_execution_payload_header: ExecutionPayloadHeader # [Modified in Capella]
# Withdrawals
next_withdrawal_index: WithdrawalIndex # [New in Capella]
next_withdrawal_validator_index: ValidatorIndex # [New in Capella]

View File

@ -29,14 +29,12 @@ def run_fork_test(post_spec, pre_state):
'inactivity_scores',
# Sync
'current_sync_committee', 'next_sync_committee',
# Execution
'latest_execution_payload_header',
]
for field in stable_fields:
assert getattr(pre_state, field) == getattr(post_state, field)
# Modified fields
modified_fields = ['fork']
modified_fields = ['fork', 'latest_execution_payload_header']
for field in modified_fields:
assert getattr(pre_state, field) != getattr(post_state, field)