Skip to content

Commit 238990f

Browse files
committed
feat: update helper for Gloas
1 parent 61a6170 commit 238990f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

beacon_chain/consensus_object_pools/blockchain_dag.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,9 +2283,8 @@ proc loadExecutionBlockHash*(dag: ChainDAGRef, bid: BlockId): Opt[Eth2Digest] =
22832283
return Opt.none(Eth2Digest)
22842284

22852285
withBlck(blockData):
2286-
debugGloasComment " "
2287-
when consensusFork == ConsensusFork.Gloas:
2288-
Opt.some ZERO_HASH
2286+
when consensusFork >= ConsensusFork.Gloas:
2287+
Opt.some forkyBlck.message.body.signed_execution_payload_bid.message.block_hash
22892288
elif consensusFork >= ConsensusFork.Bellatrix:
22902289
Opt.some forkyBlck.message.body.execution_payload.block_hash
22912290
else:

beacon_chain/spec/helpers.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ func is_merge_transition_complete*(state: gloas.BeaconState): bool =
400400

401401
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.9/sync/optimistic.md#helpers
402402
func is_execution_block*(body: SomeForkyBeaconBlockBody): bool =
403-
when typeof(body).kind == ConsensusFork.Gloas:
404-
debugGloasComment ""
405-
false
403+
when typeof(body).kind >= ConsensusFork.Gloas:
404+
# Execution payload should always be enabled since Gloas.
405+
true
406406
elif typeof(body).kind >= ConsensusFork.Bellatrix:
407407
const defaultExecutionPayload = default(typeof(body.execution_payload))
408408
body.execution_payload != defaultExecutionPayload

0 commit comments

Comments
 (0)