neoneo-go/pkg/core/interop/contract
Roman Khimov 20b19d4599 interop/contract: fix state rollbacks for nested contexts
Our wrapping optimization relied on the caller context having a TRY block,
but each context (including internal calls!) has an exception handling stack
of its own, which means that for an invocation stack of

    entry
    A.someMethodFromEntry()   # this one has a TRY
    A.internalMethodViaCALL() # this one doesn't
    B.someMethod()

we get `HasTryBlock() == false` for `A.internalMethodViaCALL()` context, which
leads to missing wrapper and missing rollbacks if B is to THROW. What this
patch does instead is it checks for any context within contract boundaries.

Fixes #3045.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-06-29 11:35:10 +03:00
..
account.go core: move contract-related interop code into appropriate package 2022-06-08 16:02:07 +03:00
account_test.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
call.go interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:35:10 +03:00
call_test.go interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:35:10 +03:00