Disable IO tracing

This commit is contained in:
Jerry 2023-04-28 12:34:32 -07:00
parent 72c030b706
commit c88be5b3b1
No known key found for this signature in database
GPG key ID: 5B33FA23CB103211
2 changed files with 5 additions and 1 deletions

View file

@ -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
}

View file

@ -449,6 +449,8 @@ func TestIOdump(t *testing.T) {
}
}))
allowIOTracing = true
ioflag := new(bool)
*ioflag = true