Pass beacon root from build args to block header.

This commit is contained in:
Louis Thibault 2024-02-14 10:07:56 -05:00
parent 46dd095ac1
commit 4b6f39ee25

View file

@ -929,11 +929,12 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
}
// Construct the sealing block header.
header := &types.Header{
ParentHash: parent.Hash(),
Number: new(big.Int).Add(parent.Number, common.Big1),
GasLimit: core.CalcGasLimit(parent.GasLimit, w.config.GasCeil),
Time: timestamp,
Coinbase: genParams.coinbase,
ParentHash: parent.Hash(),
Number: new(big.Int).Add(parent.Number, common.Big1),
GasLimit: core.CalcGasLimit(parent.GasLimit, w.config.GasCeil),
Time: timestamp,
Coinbase: genParams.coinbase,
ParentBeaconRoot: genParams.beaconRoot,
}
// Set the extra field.
if len(w.extra) != 0 {
@ -1291,6 +1292,7 @@ func (w *worker) buildBlockFromTxs(ctx context.Context, args *types.BuildBlockAr
random: args.Random,
extra: args.Extra,
withdrawals: args.Withdrawals,
beaconRoot: &args.BeaconRoot,
// noUncle: true,
noTxs: false,
}
@ -1339,6 +1341,7 @@ func (w *worker) buildBlockFromBundles(ctx context.Context, args *types.BuildBlo
random: args.Random,
extra: args.Extra,
withdrawals: args.Withdrawals,
beaconRoot: &args.BeaconRoot,
// noUncle: true,
noTxs: false,
}