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 GasLimit uint64
Random common.Hash Random common.Hash
Withdrawals []*Withdrawal Withdrawals []*Withdrawal
ParentBeaconBlockRoot common.Hash
Extra []byte Extra []byte
BeaconRoot common.Hash BeaconRoot common.Hash
FillPending bool FillPending bool

View file

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