mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 01:41:48 +00:00
vm: move InteropNameToID to emit package
This commit is contained in:
parent
93d2a3e031
commit
bfbbef952a
9 changed files with 40 additions and 34 deletions
|
@ -19,7 +19,7 @@ import (
|
|||
)
|
||||
|
||||
func fooInteropGetter(id uint32) *InteropFuncPrice {
|
||||
if id == InteropNameToID([]byte("foo")) {
|
||||
if id == emit.InteropNameToID([]byte("foo")) {
|
||||
return &InteropFuncPrice{func(evm *VM) error {
|
||||
evm.Estack().PushVal(1)
|
||||
return nil
|
||||
|
@ -46,7 +46,7 @@ func TestInteropHookViaID(t *testing.T) {
|
|||
v.RegisterInteropGetter(fooInteropGetter)
|
||||
|
||||
buf := io.NewBufBinWriter()
|
||||
fooid := InteropNameToID([]byte("foo"))
|
||||
fooid := emit.InteropNameToID([]byte("foo"))
|
||||
var id = make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(id, fooid)
|
||||
emit.Syscall(buf.BinWriter, string(id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue