miner: add inclusionList to BuildPayloadArgs and generateParams

This commit is contained in:
Jihoon Song 2024-11-30 17:52:53 +09:00
parent ed28133754
commit 3111ae8157
2 changed files with 26 additions and 23 deletions

View file

@ -43,6 +43,7 @@ type BuildPayloadArgs struct {
Random common.Hash // The provided randomness value Random common.Hash // The provided randomness value
Withdrawals types.Withdrawals // The provided withdrawals Withdrawals types.Withdrawals // The provided withdrawals
BeaconRoot *common.Hash // The provided beaconRoot (Cancun) BeaconRoot *common.Hash // The provided beaconRoot (Cancun)
InclusionList types.InclusionList // The provided inclusion list transactions
Version engine.PayloadVersion // Versioning byte for payload id calculation. Version engine.PayloadVersion // Versioning byte for payload id calculation.
} }
@ -248,6 +249,7 @@ func (miner *Miner) buildPayload(args *BuildPayloadArgs, witness bool) (*Payload
random: args.Random, random: args.Random,
withdrawals: args.Withdrawals, withdrawals: args.Withdrawals,
beaconRoot: args.BeaconRoot, beaconRoot: args.BeaconRoot,
inclusionList: args.InclusionList,
noTxs: false, noTxs: false,
} }

View file

@ -101,6 +101,7 @@ type generateParams struct {
random common.Hash // The randomness generated by beacon chain, empty before the merge random common.Hash // The randomness generated by beacon chain, empty before the merge
withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field) withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field)
beaconRoot *common.Hash // The beacon root (cancun field). beaconRoot *common.Hash // The beacon root (cancun field).
inclusionList types.InclusionList // List of inclusion list transactions.
noTxs bool // Flag whether an empty block without any transaction is expected noTxs bool // Flag whether an empty block without any transaction is expected
} }