mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Add Limit to Tranasctional Layers (#10808)
* introduce hard limit to transactional * add single layer transactional * remove single_transactional * Update mod.rs * add tests * maybe fix contracts cc @athei * fmt * fix contract logic * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Update exec.rs * add unchecked and custom errors * Update lib.rs * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Replace storage access by atomics Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -49,7 +49,9 @@ pub fn require_transactional(_attr: TokenStream, input: TokenStream) -> Result<T
|
||||
let output = quote! {
|
||||
#(#attrs)*
|
||||
#vis #sig {
|
||||
#crate_::storage::require_transaction();
|
||||
if !#crate_::storage::is_transactional() {
|
||||
return Err(#crate_::sp_runtime::TransactionalError::NoLayer.into());
|
||||
}
|
||||
#block
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user