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

@ -67,7 +67,7 @@ func TestAddBlock(t *testing.T) {
for _, block := range blocks {
key := storage.AppendPrefix(storage.DataBlock, block.Hash().BytesLE())
_, err := bc.dao.store.Get(key)
_, err := bc.dao.Store.Get(key)
require.NoErrorf(t, err, "block %s not persisted", block.Hash())
}
@ -224,7 +224,7 @@ func TestClose(t *testing.T) {
// It's a hack, but we use internal knowledge of MemoryStore
// implementation which makes it completely unusable (up to panicing)
// after Close().
_ = bc.dao.store.Put([]byte{0}, []byte{1})
_ = bc.dao.Store.Put([]byte{0}, []byte{1})
// This should never be executed.
assert.Nil(t, t)