From f575fe8041a4e5a095d3879bf767e96b24f9316e Mon Sep 17 00:00:00 2001 From: 0x2 <75550506+Code0x2@users.noreply.github.com> Date: Fri, 20 Oct 2023 21:59:56 -0700 Subject: [PATCH] add overrides --- internal/ethapi/api.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index cce7b9a0c9c6..f4f15b73a58e 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -2473,6 +2473,7 @@ type CallBundleArgs struct { SimulationLogs bool `json:"simulationLogs"` CreateAccessList bool `json:"createAccessList"` StateOverrides *StateOverride `json:"stateOverrides"` + MixDigest *common.Hash `json:"mixDigest"` } // CallBundle will simulate a bundle of transactions at the top of a given block @@ -2514,7 +2515,7 @@ func (s *SearcherAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[ } blockNumber := big.NewInt(int64(args.BlockNumber)) - timestamp := parent.Time + 1 + timestamp := parent.Time + 12 if args.Timestamp != nil { timestamp = *args.Timestamp } @@ -2536,6 +2537,10 @@ func (s *SearcherAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[ } else if s.b.ChainConfig().IsLondon(big.NewInt(args.BlockNumber.Int64())) { baseFee = eip1559.CalcBaseFee(s.b.ChainConfig(), parent) } + mixDigest := parent.MixDigest + if args.MixDigest != nil { + mixDigest = *args.MixDigest + } header := &types.Header{ ParentHash: parent.Hash(), Number: blockNumber, @@ -2544,6 +2549,7 @@ func (s *SearcherAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[ Difficulty: difficulty, Coinbase: coinbase, BaseFee: baseFee, + MixDigest: mixDigest, } // Setup context so it may be cancelled the call has completed