core: wrap cached dao properly, don't miss cached data

Fixes #817 where invoked contract missed updated account information because
it got it one layer below cachedDao used to process the block.
This commit is contained in:
Roman Khimov 2020-04-03 09:49:01 +03:00
parent f64aa201c7
commit 5f09381cf4
12 changed files with 251 additions and 113 deletions

View file

@ -16,7 +16,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, storage.NewMemoryStore(), nil, nil)
context := chain.newInteropContext(trigger.Application, newSimpleDao(storage.NewMemoryStore()), nil, nil)
require.Error(t, f(context, v))
}