interop: wrap contract.LoadToken in context.LoadToken

Creating a closure in runtime is a relatively costly thing, but it can easily
be avoided.
This commit is contained in:
Roman Khimov 2022-06-06 21:53:03 +03:00
parent 799394192b
commit 638b04b29a
5 changed files with 30 additions and 26 deletions

View file

@ -202,7 +202,7 @@ func TestAppCall(t *testing.T) {
fc := fakechain.NewFakeChain()
ic := interop.NewContext(trigger.Application, fc, dao.NewSimple(storage.NewMemoryStore(), false, false),
interop.DefaultBaseExecFee, native.DefaultStoragePrice, contractGetter, nil, nil, nil, zaptest.NewLogger(t))
interop.DefaultBaseExecFee, native.DefaultStoragePrice, contractGetter, nil, nil, nil, nil, zaptest.NewLogger(t))
t.Run("valid script", func(t *testing.T) {
src := getAppCallScript(fmt.Sprintf("%#v", ih.BytesBE()))