mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-27 21:09:57 +00:00
transactional: Wrap pallet::calls directly in storage layers (#11927)
* transactional: Wrap `pallet::calls` directly in storage layers Before this pr we only wrapped `pallet::calls` into storage layers when executing the calls with `dispatch`. This pr is solving that by wrapping each call function inside a storage layer. * Teach `BasicExternalities` transactions support * Fix crates * FMT * Fix benchmarking tests * Use correct span * Support old decl macros * Fix test * Apply suggestions from code review Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/state-trie-migration/src/lib.rs * Update frame/state-trie-migration/src/lib.rs * Update frame/state-trie-migration/src/lib.rs * Feedback * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: cheme <emericchevalier.pro@gmail.com>
This commit is contained in:
1 parent
043b1697c7
commit
aa5f68a827
10 files changed
+316
-294
No files matched your search
@@ -276,5 +276,7 @@ fn storage_layer_in_decl_pallet_call() {
|
||||
|
||||
let call2 = Call::DeclPallet(decl_pallet::Call::set_value { value: 1 });
|
||||
assert_noop!(call2.dispatch(Origin::signed(0)), "Revert!");
|
||||
// Calling the function directly also works with storage layers.
|
||||
assert_noop!(decl_pallet::Module::<Runtime>::set_value(Origin::signed(1), 1), "Revert!");
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user