Implements require_transactional (#7261)

* Implements require_transactional

* support wasm

* only enable for debug build

* remove wasm support and add feature flag

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* only use check for debug_assertions

* update per review

* update docs

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove duplicated tests

* fix test

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Xiliang Chen
2020-10-12 20:46:15 +13:00
committed by GitHub
parent 3c0a049bee
commit 806dc9a659
5 changed files with 135 additions and 2 deletions
@@ -17,7 +17,9 @@
use codec::{Encode, Decode, EncodeLike};
use frame_support::{
assert_ok, assert_noop, dispatch::{DispatchError, DispatchResult}, transactional, StorageMap, StorageValue,
assert_ok, assert_noop, transactional,
StorageMap, StorageValue,
dispatch::{DispatchError, DispatchResult},
storage::{with_transaction, TransactionOutcome::*},
};
use sp_io::TestExternalities;