mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Make New Storage Layer Truly Default (#11918)
* with storage layer truly default * fmt Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -163,19 +163,6 @@ pub fn expand_outer_dispatch(
|
||||
}
|
||||
}
|
||||
}
|
||||
impl #scrate::traits::DispatchableWithStorageLayer for Call {
|
||||
type Origin = Origin;
|
||||
fn dispatch_with_storage_layer(self, origin: Origin) -> #scrate::dispatch::DispatchResultWithPostInfo {
|
||||
#scrate::storage::with_storage_layer(|| {
|
||||
#scrate::dispatch::Dispatchable::dispatch(self, origin)
|
||||
})
|
||||
}
|
||||
fn dispatch_bypass_filter_with_storage_layer(self, origin: Origin) -> #scrate::dispatch::DispatchResultWithPostInfo {
|
||||
#scrate::storage::with_storage_layer(|| {
|
||||
#scrate::traits::UnfilteredDispatchable::dispatch_bypass_filter(self, origin)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#(
|
||||
impl #scrate::traits::IsSubType<#scrate::dispatch::CallableCallFor<#pallet_names, #runtime>> for Call {
|
||||
|
||||
@@ -267,9 +267,9 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
#frame_support::sp_tracing::enter_span!(
|
||||
#frame_support::sp_tracing::trace_span!(stringify!(#fn_name))
|
||||
);
|
||||
// We execute all dispatchable in at least one storage layer, allowing them
|
||||
// We execute all dispatchable in a new storage layer, allowing them
|
||||
// to return an error at any point, and undoing any storage changes.
|
||||
#frame_support::storage::in_storage_layer(|| {
|
||||
#frame_support::storage::with_storage_layer(|| {
|
||||
<#pallet_ident<#type_use_gen>>::#fn_name(origin, #( #args_name, )* )
|
||||
.map(Into::into).map_err(Into::into)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user