fix: fix not passing gas price to transaction contest

This commit is contained in:
stanleyjzheng 2024-05-15 18:34:39 -07:00
parent 7ed52c949e
commit bb8e8759f4
No known key found for this signature in database
GPG key ID: 3FC47EE836BE370C

View file

@ -22,7 +22,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"math/big"
"os" "os"
"runtime" "runtime"
"sync" "sync"
@ -982,7 +981,7 @@ func (api *API) traceTx(ctx context.Context, tx *types.Transaction, message *cor
return nil, err return nil, err
} }
} }
vmenv := vm.NewEVM(vmctx, vm.TxContext{GasPrice: big.NewInt(0)}, statedb, api.backend.ChainConfig(), vm.Config{Tracer: tracer.Hooks, NoBaseFee: true}) vmenv := vm.NewEVM(vmctx, vm.TxContext{GasPrice: message.GasPrice}, statedb, api.backend.ChainConfig(), vm.Config{Tracer: tracer.Hooks, NoBaseFee: true})
statedb.SetLogger(tracer.Hooks) statedb.SetLogger(tracer.Hooks)
// Define a meaningful timeout of a single transaction trace // Define a meaningful timeout of a single transaction trace