vm: move InteropNameToID to emit package
This commit is contained in:
parent
93d2a3e031
commit
bfbbef952a
9 changed files with 40 additions and 34 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -18,7 +19,7 @@ func TestVerifyGood(t *testing.T) {
|
|||
src := getVerifyProg(pub, sig, msg)
|
||||
|
||||
v, p := vmAndCompileInterop(t, src)
|
||||
p.interops[vm.InteropNameToID([]byte("Neo.Crypto.ECDsaVerify"))] = func(v *vm.VM) error {
|
||||
p.interops[emit.InteropNameToID([]byte("Neo.Crypto.ECDsaVerify"))] = func(v *vm.VM) error {
|
||||
assert.Equal(t, msg, v.Estack().Pop().Bytes())
|
||||
assert.Equal(t, pub, v.Estack().Pop().Bytes())
|
||||
assert.Equal(t, sig, v.Estack().Pop().Bytes())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue