core: move DAO to a separate package

This commit is contained in:
Evgenii Stratonikov 2020-04-07 12:41:12 +03:00
parent 4e0c3fab0f
commit 030b7754ad
13 changed files with 232 additions and 223 deletions

View file

@ -5,6 +5,7 @@ import (
"runtime"
"testing"
"github.com/nspcc-dev/neo-go/pkg/core/dao"
"github.com/nspcc-dev/neo-go/pkg/core/storage"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
"github.com/nspcc-dev/neo-go/pkg/vm"
@ -16,7 +17,7 @@ func testNonInterop(t *testing.T, value interface{}, f func(*interopContext, *vm
v.Estack().PushVal(value)
chain := newTestChain(t)
defer chain.Close()
context := chain.newInteropContext(trigger.Application, newSimpleDao(storage.NewMemoryStore()), nil, nil)
context := chain.newInteropContext(trigger.Application, dao.NewSimple(storage.NewMemoryStore()), nil, nil)
require.Error(t, f(context, v))
}