remove scriptHash type
This commit is contained in:
parent
dd9a0c56f1
commit
14f867564d
2 changed files with 4 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue