Skip to content

Commit

Permalink
core: not record zero hash beacon block root
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBSC committed Jul 31, 2024
1 parent 00cac12 commit f3615b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
// ProcessBeaconBlockRoot applies the EIP-4788 system call to the beacon block root
// contract. This method is exported to be used in tests.
func ProcessBeaconBlockRoot(beaconRoot common.Hash, vmenv *vm.EVM, statedb *state.StateDB) {
// Return immediately if beaconRoot is equal to the zero hash.
if beaconRoot == (common.Hash{}) {
return
}

// If EIP-4788 is enabled, we need to invoke the beaconroot storage contract with
// the new root
msg := &Message{
Expand Down

0 comments on commit f3615b0

Please sign in to comment.