diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 36a2785b6f..198d8623e2 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -74,6 +74,8 @@ const ( var defaultBorTraceEnabled = newBoolPtr(false) +var allowIOTracing = false // Change this to true to enable IO tracing for debugging + // Backend interface provides the common API services (that are provided by // both full and light clients) with access to necessary functions. type Backend interface { @@ -719,7 +721,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac } ioflag := defaultIOFlag - if config != nil && config.IOFlag != nil { + if allowIOTracing && config != nil && config.IOFlag != nil { ioflag = *config.IOFlag } diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 653b50d349..b7207b5b81 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -449,6 +449,8 @@ func TestIOdump(t *testing.T) { } })) + allowIOTracing = true + ioflag := new(bool) *ioflag = true