Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit ccecf76

Browse files
committed
Add state overrides to callBundle rpc
1 parent 9c081d6 commit ccecf76

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/ethapi/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,6 +2399,7 @@ type CallBundleArgs struct {
23992399
BaseFee *big.Int `json:"baseFee"`
24002400
SimulationLogs bool `json:"simulationLogs"`
24012401
CreateAccessList bool `json:"createAccessList"`
2402+
StateOverrides *StateOverride `json:"stateOverrides"`
24022403
}
24032404

24042405
// CallBundle will simulate a bundle of transactions at the top of a given block
@@ -2435,6 +2436,9 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st
24352436
if state == nil || err != nil {
24362437
return nil, err
24372438
}
2439+
if err := args.StateOverrides.Apply(state); err != nil {
2440+
return nil, err
2441+
}
24382442
blockNumber := big.NewInt(int64(args.BlockNumber))
24392443

24402444
timestamp := parent.Time + 1

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ func (w *worker) fillTransactions(interrupt *int32, env *environment) error {
12851285
}
12861286
if w.flashbots.isMegabundleWorker {
12871287
megabundle, err := w.eth.TxPool().GetMegabundle(w.flashbots.relayAddr, env.header.Number, env.header.Time)
1288-
log.Info("Starting to process a Megabundle", "relay", w.flashbots.relayAddr, "megabundle", megabundle, "error", err)
1288+
log.Debug("Starting to process a Megabundle", "relay", w.flashbots.relayAddr, "megabundle", megabundle, "error", err)
12891289
if err != nil {
12901290
return err // no valid megabundle for this relay, nothing to do
12911291
}

0 commit comments

Comments
 (0)