Skip to content

Commit

Permalink
Improve logic for detecting the default tracer config
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Dec 18, 2024
1 parent 71e61e4 commit a746c82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"fmt"
"math/big"
"slices"
"strings"

"github.com/goccy/go-json"
"github.com/onflow/flow-go/fvm/evm/offchain/query"
Expand Down Expand Up @@ -480,6 +480,6 @@ func isDefaultCallTracer(config *tracers.TraceConfig) bool {
return false
}

tracerConfig := json.RawMessage(replayer.TracerConfig)
return slices.Equal(config.TracerConfig, tracerConfig)
trimmedConfig := strings.ReplaceAll(string(config.TracerConfig), " ", "")
return trimmedConfig == replayer.TracerConfig
}

0 comments on commit a746c82

Please sign in to comment.