sp-api: Support nested transactions (#14447)

* sp-api: Support nested transactions

Adds support for nested transactions in `sp-api` by using `execute_in_transaction`. This was working
until a recent refactor, but this was actually not intended. However, supporting nested transactions
is a worthwhile feature to have. So, this pr "brings it back" and adds a test to ensure it will not break.

* Make clippy happy

* Assert that the runtime api type is not unwind safe

* Count number of transactions
This commit is contained in:
Bastian Köcher
2023-06-29 18:01:45 +02:00
committed by GitHub
parent 83caca85b6
commit 448989f5ec
5 changed files with 111 additions and 44 deletions
+1
View File
@@ -10683,6 +10683,7 @@ dependencies = [
"sp-state-machine",
"sp-tracing",
"sp-version",
"static_assertions",
"substrate-test-runtime-client",
"trybuild",
]