Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,6 @@ impl_runtime_apis! {
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec(),
// System Events
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec(),
// Caller 0 Account
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da946c154ffd9992e395af90b5b13cc6f295c77033fce8a9045824a6690bbf99c6db269502f0a8d1d2a008542d5690a0749").to_vec(),
// Treasury Account
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec(),
];
Expand Down
4 changes: 4 additions & 0 deletions client/db/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ impl<B: BlockT> StateBackend<HashFor<B>> for BenchmarkingState<B> {
self.wipe_tracker()
}

fn get_whitelist(&self) -> Vec<Vec<u8>> {
self.whitelist.borrow_mut().to_vec()
}

fn set_whitelist(&self, new: Vec<Vec<u8>>) {
*self.whitelist.borrow_mut() = new;
}
Expand Down
8 changes: 4 additions & 4 deletions frame/balances/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use super::*;

use frame_system::RawOrigin;
use frame_benchmarking::{benchmarks, account};
use frame_benchmarking::{benchmarks, account, whitelisted_caller};
use sp_runtime::traits::Bounded;

use crate::Module as Balances;
Expand All @@ -40,7 +40,7 @@ benchmarks! {
// * Transfer will create the recipient account.
transfer {
let existential_deposit = T::ExistentialDeposit::get();
let caller = account("caller", 0, SEED);
let caller = whitelisted_caller();

// Give some multiple of the existential deposit + creation fee + transfer fee
let balance = existential_deposit.saturating_mul(ED_MULTIPLIER.into());
Expand All @@ -60,7 +60,7 @@ benchmarks! {
// * Both accounts exist and will continue to exist.
#[extra]
transfer_best_case {
let caller = account("caller", 0, SEED);
let caller = whitelisted_caller();
let recipient: T::AccountId = account("recipient", 0, SEED);
let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone());

Expand All @@ -80,7 +80,7 @@ benchmarks! {
// Benchmark `transfer_keep_alive` with the worst possible condition:
// * The recipient account is created.
transfer_keep_alive {
let caller = account("caller", 0, SEED);
let caller = whitelisted_caller();
let recipient: T::AccountId = account("recipient", 0, SEED);
let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone());

Expand Down
Loading