mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +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:
@@ -42,8 +42,8 @@ where
|
||||
.to_string()],
|
||||
at: None,
|
||||
hashed_prefixes: vec![
|
||||
<pallet_staking::Bonded<Runtime>>::prefix_hash(),
|
||||
<pallet_staking::Ledger<Runtime>>::prefix_hash(),
|
||||
<pallet_staking::Bonded<Runtime>>::prefix_hash().to_vec(),
|
||||
<pallet_staking::Ledger<Runtime>>::prefix_hash().to_vec(),
|
||||
<pallet_staking::Validators<Runtime>>::map_storage_final_prefix(),
|
||||
<pallet_staking::Nominators<Runtime>>::map_storage_final_prefix(),
|
||||
],
|
||||
|
||||
@@ -39,8 +39,8 @@ pub async fn execute<Runtime, Block>(
|
||||
pallets: vec![pallet_bags_list::Pallet::<Runtime, pallet_bags_list::Instance1>::name()
|
||||
.to_string()],
|
||||
hashed_prefixes: vec![
|
||||
<pallet_staking::Bonded<Runtime>>::prefix_hash(),
|
||||
<pallet_staking::Ledger<Runtime>>::prefix_hash(),
|
||||
<pallet_staking::Bonded<Runtime>>::prefix_hash().to_vec(),
|
||||
<pallet_staking::Ledger<Runtime>>::prefix_hash().to_vec(),
|
||||
],
|
||||
..Default::default()
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user