mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Dynamic Benchmarking DB Whitelist (#6815)
* Add `get_whitelist` api * add whitelisted caller * Whitelist caller * remove caller 0 * initial piping of origin (not actual value yet) * remove attempt to pass origin around * Add whitelist for `DidUpdate` storage on `pallet_timestamp` * fix traits * only add to whitelist if !contains * PassBy not implemented error * Whitelist read/writes explicitly per key * update docs * reduce trait constraint * copy pasta * Apply suggestions from code review Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * rename functions @apopiak * missed some renaming * enable doc tests * Update docs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use super::*;
|
||||
use codec::Decode;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::{H256, Header}};
|
||||
use frame_support::{
|
||||
@@ -64,12 +63,10 @@ pub trait OtherTrait {
|
||||
type OtherEvent;
|
||||
}
|
||||
|
||||
pub trait Trait: OtherTrait where Self::OtherEvent: Into<Self::Event> {
|
||||
pub trait Trait: frame_system::Trait + OtherTrait
|
||||
where Self::OtherEvent: Into<<Self as Trait>::Event>
|
||||
{
|
||||
type Event;
|
||||
type BlockNumber;
|
||||
type AccountId: 'static + Default + Decode;
|
||||
type Origin: From<frame_system::RawOrigin<Self::AccountId>> +
|
||||
Into<Result<RawOrigin<Self::AccountId>, Self::Origin>>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
@@ -105,9 +102,6 @@ impl frame_system::Trait for Test {
|
||||
|
||||
impl Trait for Test {
|
||||
type Event = ();
|
||||
type BlockNumber = u32;
|
||||
type Origin = Origin;
|
||||
type AccountId = u64;
|
||||
}
|
||||
|
||||
impl OtherTrait for Test {
|
||||
|
||||
Reference in New Issue
Block a user