(OOP SSZ) if the fields are updated, we need to redefine them when defining the new SSZ class with the new field classes

This commit is contained in:
Hsiao-Wei Wang 2020-12-11 16:17:16 +08:00 committed by protolambda
parent 1ce25c19e8
commit 55d9f62bf2
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -141,6 +141,11 @@ class BeaconBlock(phase0.BeaconBlock):
```python
class BeaconState(phase0.BeaconState):
# Updated fields
latest_block_header: BeaconBlockHeader
previous_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH]
current_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH]
# New fields
current_epoch_pending_headers: List[PendingHeader, MAX_PENDING_HEADERS * SLOTS_PER_EPOCH]
previous_epoch_pending_headers: List[PendingHeader, MAX_PENDING_HEADERS * SLOTS_PER_EPOCH]
most_recent_confirmed_commitments: Vector[Vector[DataCommitment, SLOTS_PER_EPOCH], MAX_SHARDS]