mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Clean up #[transactional] (#11546)
* Deprecate #[transactional] attribute Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove #[transactional] from nomination pools Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Review fix Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Fix NOOP test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Suppress warnings Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c91c1c793e
commit
442602ce3f
@@ -429,6 +429,7 @@ pub fn pallet(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
/// }
|
||||
/// ```
|
||||
#[proc_macro_attribute]
|
||||
#[deprecated(note = "This is now the default behaviour for all extrinsics.")]
|
||||
pub fn transactional(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
transactional::transactional(attr, input).unwrap_or_else(|e| e.to_compile_error().into())
|
||||
}
|
||||
|
||||
@@ -200,6 +200,7 @@ impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug +
|
||||
///
|
||||
/// Transactional function discards all changes to storage if it returns `Err`, or commits if
|
||||
/// `Ok`, via the #\[transactional\] attribute. Note the attribute must be after #\[weight\].
|
||||
/// The #\[transactional\] attribute is deprecated since it is the default behaviour.
|
||||
///
|
||||
/// ```
|
||||
/// # #[macro_use]
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Disable warnings for #\[transactional\] being deprecated.
|
||||
#![allow(deprecated)]
|
||||
|
||||
use frame_support::{
|
||||
assert_noop, assert_ok, assert_storage_noop,
|
||||
dispatch::{DispatchError, DispatchResult},
|
||||
|
||||
Reference in New Issue
Block a user