-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Whitelist pallet preimage provider upgrade #12834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
frame/whitelist/src/benchmarking.rs
Outdated
@@ -40,7 +37,7 @@ benchmarks! { | |||
"call not whitelisted" | |||
); | |||
ensure!( | |||
T::PreimageProvider::preimage_requested(&call_hash), | |||
<T::Preimages as QueryPreimage>::is_requested(&call_hash), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
<T::Preimages as QueryPreimage>::is_requested(&call_hash), | |
T::Preimages::is_requested(&call_hash), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated it everywhere.
frame/whitelist/src/lib.rs
Outdated
WhitelistedCallDispatched { call_hash: T::Hash, result: DispatchResultWithPostInfo }, | ||
CallWhitelisted { call_hash: Hash }, | ||
WhitelistedCallRemoved { call_hash: Hash }, | ||
WhitelistedCallDispatched { call_hash: Hash, result: DispatchResultWithPostInfo }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can change these to H256
to easier spot that it is not the standard T::Hash
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also be preimages::Hash as PreimageHash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
frame/whitelist/src/lib.rs
Outdated
@@ -114,12 +114,12 @@ pub mod pallet { | |||
} | |||
|
|||
#[pallet::storage] | |||
pub type WhitelistedCall<T: Config> = StorageMap<_, Twox64Concat, T::Hash, (), OptionQuery>; | |||
pub type WhitelistedCall<T: Config> = StorageMap<_, Twox64Concat, Hash, (), OptionQuery>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we always use Hash = H256
but it would need a migration if some chains use something different.
Probably noteworthy for the change-log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much doubt any are.
/cmd queue -c bench-bot $ pallet dev pallet_whitelist |
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2120335 was started for your command Comment |
@ggwpez Command |
will wait for the companion to be approved, before merging. |
* whitelist preimage provider upgrade * rustdocs unresolved link error fix * ".git/.scripts/bench-bot.sh" pallet dev pallet_whitelist * PreimageHash alias, remove type annotation Co-authored-by: command-bot <>
* whitelist preimage provider upgrade * rustdocs unresolved link error fix * ".git/.scripts/bench-bot.sh" pallet dev pallet_whitelist * PreimageHash alias, remove type annotation Co-authored-by: command-bot <>
Attempt to solve #12821
polkadot companion: paritytech/polkadot#6392