From aa16fddbd51d4fd020e438cb743f3b537c80604a Mon Sep 17 00:00:00 2001 From: Dmarz Date: Mon, 28 Mar 2022 13:22:01 -0400 Subject: [PATCH] payload changes --- internal/ethapi/api.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index c7aa792f00b0..7f8304413a85 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -2369,6 +2369,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st "traceResult": traceResult, // Add trace results here } + totalGasUsed += receipt.GasUsed if result.Err != nil { jsonResult["error"] = result.Err.Error() revert := result.Revert() @@ -2386,15 +2387,9 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st ret := map[string]interface{}{} ret["results"] = results - coinbaseDiff := new(big.Int).Sub(state.GetBalance(coinbase), coinbaseBalanceBefore) - ret["coinbaseDiff"] = coinbaseDiff.String() ret["gasFees"] = gasFees.String() - ret["ethSentToCoinbase"] = new(big.Int).Sub(coinbaseDiff, gasFees).String() - //ret["bundleGasPrice"] = new(big.Int).Div(coinbaseDiff, big.NewInt(int64(totalGasUsed))).String() - ret["totalGasUsed"] = totalGasUsed - ret["stateBlockNumber"] = parent.Number.Int64() - - // ret["bundleHash"] = "0x" + common.Bytes2Hex(bundleHash.Sum(nil)) + ret["gasUsed"] = totalGasUsed + ret["blockNumber"] = parent.Number.Int64() ret["args"] = header return ret, nil