aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api_tracer.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-01-03 18:58:25 +0800
committerGitHub <noreply@github.com>2018-01-03 18:58:25 +0800
commit9d48dbf5c2d0401042134d94997be1850bf8499b (patch)
tree03d5b4b701d80c3437deb00c996b4b1f4606c956 /eth/api_tracer.go
parent85a1eda59e44a32b6c8267889efedca33d3e703b (diff)
downloaddexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar.gz
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar.bz2
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar.lz
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar.xz
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.tar.zst
dexon-9d48dbf5c2d0401042134d94997be1850bf8499b.zip
eth: revert tracer preimage recording (#15800)
This reverts commits 85a1eda59e (#15792) and c495bca4ad (#15787) because they introduce database writes during tracing.
Diffstat (limited to 'eth/api_tracer.go')
-rw-r--r--eth/api_tracer.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go
index 26e47dcb6..0d0e2a73c 100644
--- a/eth/api_tracer.go
+++ b/eth/api_tracer.go
@@ -667,15 +667,12 @@ func (api *PrivateDebugAPI) traceTx(ctx context.Context, message core.Message, v
tracer = vm.NewStructLogger(config.LogConfig)
}
// Run the transaction with tracing enabled.
- vmenv := vm.NewEVM(vmctx, statedb, api.config, vm.Config{Debug: true, Tracer: tracer, EnablePreimageRecording: true})
+ vmenv := vm.NewEVM(vmctx, statedb, api.config, vm.Config{Debug: true, Tracer: tracer})
ret, gas, failed, err := core.ApplyMessage(vmenv, message, new(core.GasPool).AddGas(message.Gas()))
if err != nil {
return nil, fmt.Errorf("tracing failed: %v", err)
}
- if err := core.WritePreimages(api.eth.ChainDb(), vmctx.BlockNumber.Uint64(), statedb.Preimages()); err != nil {
- return nil, fmt.Errorf("can't write preimage: %v", err)
- }
// Depending on the tracer type, format and return the output
switch tracer := tracer.(type) {
case *vm.StructLogger: