mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
vm: move InteropNameToID to a separate package
This commit is contained in:
parent
9cc6e22365
commit
f3650e20b0
14 changed files with 60 additions and 52 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/bigint"
|
||||
"github.com/nspcc-dev/neo-go/pkg/internal/random"
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
|
@ -23,7 +24,7 @@ import (
|
|||
)
|
||||
|
||||
func fooInteropHandler(v *VM, id uint32) error {
|
||||
if id == emit.InteropNameToID([]byte("foo")) {
|
||||
if id == interopnames.ToID([]byte("foo")) {
|
||||
if !v.AddGas(1) {
|
||||
return errors.New("invalid gas amount")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue