diff --git a/pkg/neotest/compile.go b/pkg/neotest/compile.go index 7f1165edb9..c8288de3a0 100644 --- a/pkg/neotest/compile.go +++ b/pkg/neotest/compile.go @@ -89,7 +89,7 @@ func CompileFile(t testing.TB, sender util.Uint160, srcPath string, configPath s return c } -func collectCoverage(t testing.TB, di *compiler.DebugInfo, h scriptHash) { +func collectCoverage(t testing.TB, di *compiler.DebugInfo, h util.Uint160) { if isCoverageEnabled() { if _, ok := rawCoverage[h]; !ok { rawCoverage[h] = &scriptRawCoverage{debugInfo: di} diff --git a/pkg/neotest/coverage.go b/pkg/neotest/coverage.go index 338c09d90d..39ced18168 100644 --- a/pkg/neotest/coverage.go +++ b/pkg/neotest/coverage.go @@ -12,13 +12,11 @@ import ( "github.com/nspcc-dev/neo-go/pkg/vm/opcode" ) -var rawCoverage = make(map[scriptHash]*scriptRawCoverage) +var rawCoverage = make(map[util.Uint160]*scriptRawCoverage) var enabled bool var coverProfile = "" -type scriptHash = util.Uint160 - type scriptRawCoverage struct { debugInfo *compiler.DebugInfo offsetsVisited []int @@ -55,8 +53,8 @@ func isCoverageEnabled() bool { } func coverageHook() vm.OnExecHook { - return func(sh scriptHash, offset int, opcode opcode.Opcode) { - if cov, ok := rawCoverage[sh]; ok { + return func(scriptHash util.Uint160, offset int, opcode opcode.Opcode) { + if cov, ok := rawCoverage[scriptHash]; ok { cov.offsetsVisited = append(cov.offsetsVisited, offset) } }