Whitelist Transactional key (#11394)

* Make constants public

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Whitelist the transactional layer

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-05-12 03:34:38 +02:00
committed by GitHub
parent d06d20d65b
commit 0873e1703b
3 changed files with 80 additions and 92 deletions
+6
View File
@@ -1021,6 +1021,12 @@ macro_rules! impl_benchmark {
$crate::whitelisted_caller::<T::AccountId>()
);
whitelist.push(whitelisted_caller_key.into());
// Whitelist the transactional layer.
let transactional_layer_key = $crate::TrackedStorageKey::new(
$crate::frame_support::storage::transactional::TRANSACTION_LEVEL_KEY.into()
);
whitelist.push(transactional_layer_key);
$crate::benchmarking::set_whitelist(whitelist);
let mut results: $crate::Vec<$crate::BenchmarkResult> = $crate::Vec::new();