Merge pull request #17 from eden-network/dancun_beacon_root

Fix Dancun changes
This commit is contained in:
Louis Thibault 2024-02-14 17:06:19 +01:00 committed by GitHub
commit d0a8120c8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -15,6 +15,7 @@ type BuildBlockArgs struct {
GasLimit uint64
Random common.Hash
Withdrawals []*Withdrawal
ParentBeaconBlockRoot common.Hash
Extra []byte
BeaconRoot common.Hash
FillPending bool

View file

@ -938,7 +938,11 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
}
// Set the extra field.
if len(w.extra) != 0 {
header.Extra = w.extra
if len(genParams.extra) != 0 {
header.Extra = genParams.extra
} else {
header.Extra = w.extra
}
}
// Set the randomness field from the beacon chain if it's available.
if genParams.random != (common.Hash{}) {