mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Better Handle Dead Accounts in Balances (#7843)
* Don't mutate storage when account is dead and should stay dead * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * more concrete storage noop Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -499,6 +499,21 @@ macro_rules! assert_noop {
|
||||
}
|
||||
}
|
||||
|
||||
/// Evaluate any expression and assert that runtime storage has not been mutated
|
||||
/// (i.e. expression is a storage no-operation).
|
||||
///
|
||||
/// Used as `assert_storage_noop(expression_to_assert)`.
|
||||
#[macro_export]
|
||||
macro_rules! assert_storage_noop {
|
||||
(
|
||||
$x:expr
|
||||
) => {
|
||||
let h = $crate::storage_root();
|
||||
$x;
|
||||
assert_eq!(h, $crate::storage_root());
|
||||
}
|
||||
}
|
||||
|
||||
/// Assert an expression returns an error specified.
|
||||
///
|
||||
/// Used as `assert_err!(expression_to_assert, expected_error_expression)`
|
||||
|
||||
Reference in New Issue
Block a user