mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-26 22:39:49 +00:00
reorder get_initial_beacon_block
by fork (#4899)
Deneb was listed between Capella and Bellatrix. Swap with Capella.
This commit is contained in:
parent
23adf15e5a
commit
a23252c297
@ -258,18 +258,7 @@ func get_initial_beacon_block*(state: bellatrix.HashedBeaconState):
|
||||
bellatrix.TrustedSignedBeaconBlock(
|
||||
message: message, root: hash_tree_root(message))
|
||||
|
||||
func get_initial_beacon_block*(state: deneb.HashedBeaconState):
|
||||
deneb.TrustedSignedBeaconBlock =
|
||||
# The genesis block is implicitly trusted
|
||||
let message = deneb.TrustedBeaconBlock(
|
||||
slot: state.data.slot,
|
||||
state_root: state.root)
|
||||
# parent_root, randao_reveal, eth1_data, signature, and body automatically
|
||||
# initialized to default values.
|
||||
deneb.TrustedSignedBeaconBlock(
|
||||
message: message, root: hash_tree_root(message))
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/merge/beacon-chain.md#testing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#testing
|
||||
func get_initial_beacon_block*(state: capella.HashedBeaconState):
|
||||
capella.TrustedSignedBeaconBlock =
|
||||
# The genesis block is implicitly trusted
|
||||
@ -281,6 +270,18 @@ func get_initial_beacon_block*(state: capella.HashedBeaconState):
|
||||
capella.TrustedSignedBeaconBlock(
|
||||
message: message, root: hash_tree_root(message))
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/deneb/beacon-chain.md#testing
|
||||
func get_initial_beacon_block*(state: deneb.HashedBeaconState):
|
||||
deneb.TrustedSignedBeaconBlock =
|
||||
# The genesis block is implicitly trusted
|
||||
let message = deneb.TrustedBeaconBlock(
|
||||
slot: state.data.slot,
|
||||
state_root: state.root)
|
||||
# parent_root, randao_reveal, eth1_data, signature, and body automatically
|
||||
# initialized to default values.
|
||||
deneb.TrustedSignedBeaconBlock(
|
||||
message: message, root: hash_tree_root(message))
|
||||
|
||||
func get_initial_beacon_block*(state: ForkedHashedBeaconState):
|
||||
ForkedTrustedSignedBeaconBlock =
|
||||
withState(state):
|
||||
|
Loading…
x
Reference in New Issue
Block a user