mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 19:02:28 +00:00
core: simplify newInteropContext
This commit is contained in:
parent
45a4524054
commit
637c99eda7
3 changed files with 16 additions and 14 deletions
|
@ -9,13 +9,12 @@ import (
|
|||
"github.com/CityOfZion/neo-go/pkg/smartcontract/trigger"
|
||||
"github.com/CityOfZion/neo-go/pkg/vm"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
)
|
||||
|
||||
func testNonInterop(t *testing.T, value interface{}, f func(*interopContext, *vm.VM) error) {
|
||||
v := vm.New()
|
||||
v.Estack().PushVal(value)
|
||||
context := newInteropContext(trigger.Application, newTestChain(t), storage.NewMemoryStore(), nil, nil, zaptest.NewLogger(t))
|
||||
context := newTestChain(t).newInteropContext(trigger.Application, storage.NewMemoryStore(), nil, nil)
|
||||
require.Error(t, f(context, v))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue