Set `GENESIS_FORK_VERSION` to a `bytes4` constant (#792)

* Set `GENESIS_FORK_VERSION` to a `bytes4` constant

* Update 0_beacon-chain.md
This commit is contained in:
Hsiao-Wei Wang 2019-03-17 19:33:42 +08:00 committed by Justin
parent 390ece7fbe
commit 6b82f5e999
1 changed files with 3 additions and 3 deletions

View File

@ -208,7 +208,7 @@ Code snippets appearing in `this style` are to be interpreted as Python code.
| Name | Value | | Name | Value |
| - | - | | - | - |
| `GENESIS_FORK_VERSION` | `0` | | `GENESIS_FORK_VERSION` | `int_to_bytes4(0)` |
| `GENESIS_SLOT` | `2**32` | | `GENESIS_SLOT` | `2**32` |
| `GENESIS_EPOCH` | `slot_to_epoch(GENESIS_SLOT)` | | `GENESIS_EPOCH` | `slot_to_epoch(GENESIS_SLOT)` |
| `GENESIS_START_SHARD` | `0` | | `GENESIS_START_SHARD` | `0` |
@ -1517,8 +1517,8 @@ def get_genesis_beacon_state(genesis_validator_deposits: List[Deposit],
slot=GENESIS_SLOT, slot=GENESIS_SLOT,
genesis_time=genesis_time, genesis_time=genesis_time,
fork=Fork( fork=Fork(
previous_version=int_to_bytes4(GENESIS_FORK_VERSION), previous_version=GENESIS_FORK_VERSION,
current_version=int_to_bytes4(GENESIS_FORK_VERSION), current_version=GENESIS_FORK_VERSION,
epoch=GENESIS_EPOCH, epoch=GENESIS_EPOCH,
), ),