Integrate pallet_contracts gas with the weight system (#5712)

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
This commit is contained in:
Alexander Theißen
2020-04-24 10:48:13 +02:00
committed by GitHub
parent e731817e24
commit 000c924b62
20 changed files with 386 additions and 680 deletions
+12 -4
View File
@@ -193,10 +193,6 @@ macro_rules! assert_noop {
}
}
/// Panic if an expression doesn't evaluate to an `Err`.
///
/// Used as `assert_err!(expression_to_assert, expected_err_expression)`.
/// Assert an expression returns an error specified.
///
/// Used as `assert_err!(expression_to_assert, expected_error_expression)`
@@ -208,6 +204,18 @@ macro_rules! assert_err {
}
}
/// Assert an expression returns an error specified.
///
/// This can be used on`DispatchResultWithPostInfo` when the post info should
/// be ignored.
#[macro_export]
#[cfg(feature = "std")]
macro_rules! assert_err_ignore_postinfo {
( $x:expr , $y:expr $(,)? ) => {
assert_err!($x.map(|_| ()).map_err(|e| e.error), $y);
}
}
/// Panic if an expression doesn't evaluate to `Ok`.
///
/// Used as `assert_ok!(expression_to_assert, expected_ok_expression)`,