From e9e86aeacbfc810016c2451e8b21616a3ea0b927 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 2 Dec 2020 12:49:20 +0100 Subject: [PATCH] eth: fix error in tracing if reexec is set (#21830) * eth: fix error in tracing if reexec is set * eth: change pointer embedding to value-embedding --- eth/api_tracer.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 804d26b0b..2497c8d95 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -65,7 +65,7 @@ type TraceConfig struct { // StdTraceConfig holds extra parameters to standard-json trace functions. type StdTraceConfig struct { - *vm.LogConfig + vm.LogConfig Reexec *uint64 TxHash common.Hash } @@ -549,9 +549,7 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block txHash common.Hash ) if config != nil { - if config.LogConfig != nil { - logConfig = *config.LogConfig - } + logConfig = config.LogConfig txHash = config.TxHash } logConfig.Debug = true @@ -576,7 +574,7 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block chainConfigCopy := new(params.ChainConfig) *chainConfigCopy = *chainConfig chainConfig = chainConfigCopy - if yolov2 := config.Overrides.YoloV2Block; yolov2 != nil { + if yolov2 := config.LogConfig.Overrides.YoloV2Block; yolov2 != nil { chainConfig.YoloV2Block = yolov2 canon = false }