@@ -201,7 +201,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
201201
202202 // Fetch and execute the next block trace tasks
203203 for task := range tasks {
204- signer := types .MakeSigner (api .config , task .block .Number ())
204+ signer := types .MakeSigner (api .eth . blockchain . Config () , task .block .Number ())
205205
206206 // Trace all the transactions contained within
207207 for i , tx := range task .block .Transactions () {
@@ -295,7 +295,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
295295 break
296296 }
297297 // Finalize the state so any modifications are written to the trie
298- root , err := statedb .Commit (api .eth .chainConfig .IsEIP158 (block .Number ()))
298+ root , err := statedb .Commit (api .eth .blockchain . Config () .IsEIP158 (block .Number ()))
299299 if err != nil {
300300 failed = err
301301 break
@@ -460,7 +460,7 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
460460 }
461461 // Execute all the transaction contained within the block concurrently
462462 var (
463- signer = types .MakeSigner (api .config , block .Number ())
463+ signer = types .MakeSigner (api .eth . blockchain . Config () , block .Number ())
464464
465465 txs = block .Transactions ()
466466 results = make ([]* txTraceResult , len (txs ))
@@ -501,7 +501,7 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
501501 msg , _ := tx .AsMessage (signer )
502502 vmctx := core .NewEVMContext (msg , block .Header (), api .eth .blockchain , nil )
503503
504- vmenv := vm .NewEVM (vmctx , statedb , api .config , vm.Config {})
504+ vmenv := vm .NewEVM (vmctx , statedb , api .eth . blockchain . Config () , vm.Config {})
505505 if _ , _ , _ , err := core .ApplyMessage (vmenv , msg , new (core.GasPool ).AddGas (msg .Gas ())); err != nil {
506506 failed = err
507507 break
@@ -561,7 +561,7 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block
561561
562562 // Execute transaction, either tracing all or just the requested one
563563 var (
564- signer = types .MakeSigner (api .config , block .Number ())
564+ signer = types .MakeSigner (api .eth . blockchain . Config () , block .Number ())
565565 dumps []string
566566 )
567567 for i , tx := range block .Transactions () {
@@ -595,7 +595,7 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block
595595 }
596596 }
597597 // Execute the transaction and flush any traces to disk
598- vmenv := vm .NewEVM (vmctx , statedb , api .config , vmConf )
598+ vmenv := vm .NewEVM (vmctx , statedb , api .eth . blockchain . Config () , vmConf )
599599 _ , _ , _ , err = core .ApplyMessage (vmenv , msg , new (core.GasPool ).AddGas (msg .Gas ()))
600600 if writer != nil {
601601 writer .Flush ()
@@ -756,7 +756,7 @@ func (api *PrivateDebugAPI) traceTx(ctx context.Context, message core.Message, v
756756 tracer = vm .NewStructLogger (config .LogConfig )
757757 }
758758 // Run the transaction with tracing enabled.
759- vmenv := vm .NewEVM (vmctx , statedb , api .config , vm.Config {Debug : true , Tracer : tracer })
759+ vmenv := vm .NewEVM (vmctx , statedb , api .eth . blockchain . Config () , vm.Config {Debug : true , Tracer : tracer })
760760
761761 ret , gas , failed , err := core .ApplyMessage (vmenv , message , new (core.GasPool ).AddGas (message .Gas ()))
762762 if err != nil {
@@ -796,7 +796,7 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
796796 return nil , vm.Context {}, nil , err
797797 }
798798 // Recompute transactions up to the target index.
799- signer := types .MakeSigner (api .config , block .Number ())
799+ signer := types .MakeSigner (api .eth . blockchain . Config () , block .Number ())
800800
801801 for idx , tx := range block .Transactions () {
802802 // Assemble the transaction call message and return if the requested offset
@@ -806,7 +806,7 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
806806 return msg , context , statedb , nil
807807 }
808808 // Not yet the searched for transaction, execute on top of the current state
809- vmenv := vm .NewEVM (context , statedb , api .config , vm.Config {})
809+ vmenv := vm .NewEVM (context , statedb , api .eth . blockchain . Config () , vm.Config {})
810810 if _ , _ , _ , err := core .ApplyMessage (vmenv , msg , new (core.GasPool ).AddGas (tx .Gas ())); err != nil {
811811 return nil , vm.Context {}, nil , fmt .Errorf ("transaction %#x failed: %v" , tx .Hash (), err )
812812 }
0 commit comments