mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
feat: compute pallet/storage prefix hash at compile time (#1539)
Since the hash rules of this part of the `pallet_prefix/storage_prefix` are always fixed, we can put the runtime calculation into compile time. --- polkadot address: 15ouFh2SHpGbHtDPsJ6cXQfes9Cx1gEFnJJsJVqPGzBSTudr --------- Co-authored-by: Juan <juangirini@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -205,7 +205,7 @@ impl<T: Config> Pallet<T> {
|
||||
/// Ensure that this call can be paused.
|
||||
pub fn ensure_can_pause(full_name: &RuntimeCallNameOf<T>) -> Result<(), Error<T>> {
|
||||
// SAFETY: The `TxPause` pallet can never pause itself.
|
||||
if full_name.0.as_ref() == <Self as PalletInfoAccess>::name().as_bytes().to_vec() {
|
||||
if full_name.0.as_slice() == <Self as PalletInfoAccess>::name().as_bytes() {
|
||||
return Err(Error::<T>::Unpausable)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user