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

Commit ec407c9

Browse files
committed
add more additions
1 parent 19302e2 commit ec407c9

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

internal/ethapi/api.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st
26392639
acl, gasUsed, vmerr, err := AccessListOnState(ctx, s.b, header, accessListState, txargs)
26402640
if err == nil {
26412641
if gasUsed != receipt.GasUsed {
2642-
log.Info("Gas used in receipt differ from accesslist", "receipt", receipt.GasUsed, "acl", gasUsed) // weird bug but it works
2642+
log.Debug("Gas used in receipt differ from accesslist", "receipt", receipt.GasUsed, "acl", gasUsed) // weird bug but it works
26432643
}
26442644
if vmerr != nil {
26452645
log.Info("CallBundle accesslist creation encountered vmerr", "vmerr", vmerr)
@@ -2794,6 +2794,14 @@ func (s *BundleAPI) EstimateGasBundle(ctx context.Context, args EstimateGasBundl
27942794
"gasUsed": result.UsedGas,
27952795
}
27962796

2797+
if result.Err != nil {
2798+
jsonResult["error"] = result.Err.Error()
2799+
revert := result.Revert()
2800+
if len(revert) > 0 {
2801+
jsonResult["revert"] = string(revert)
2802+
}
2803+
}
2804+
27972805
// if simulation logs are requested append it to logs
27982806
// if an access list is requested create and append
27992807
if args.CreateAccessList {

internal/web3ext/web3ext.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,16 @@ web3._extend({
625625
call: 'eth_getLogs',
626626
params: 1,
627627
}),
628+
new web3._extend.Method({
629+
name: 'callBundle',
630+
call: 'eth_callBundle',
631+
params: 1,
632+
}),
633+
new web3._extend.Method({
634+
name: 'estimateGasBundle',
635+
call: 'eth_estimateGasBundle',
636+
params: 1,
637+
}),
628638
new web3._extend.Method({
629639
name: 'sendBundle',
630640
call: 'eth_sendBundle',

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ func (w *worker) fillTransactions(interrupt *int32, env *environment) error {
12741274
log.Error("Failed to generate flashbots bundle", "err", err)
12751275
return err
12761276
}
1277-
log.Info("Flashbots bundle", "ethToCoinbase", ethIntToFloat(bundle.totalEth), "gasUsed", bundle.totalGasUsed, "bundleScore", bundle.mevGasPrice, "bundleLength", len(bundleTxs), "numBundles", numBundles, "worker", w.flashbots.maxMergedBundles)
1277+
log.Debug("Flashbots bundle", "ethToCoinbase", ethIntToFloat(bundle.totalEth), "gasUsed", bundle.totalGasUsed, "bundleScore", bundle.mevGasPrice, "bundleLength", len(bundleTxs), "numBundles", numBundles, "worker", w.flashbots.maxMergedBundles)
12781278
if len(bundleTxs) == 0 {
12791279
return errors.New("no bundles to apply")
12801280
}

0 commit comments

Comments
 (0)