mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 21:11:01 +00:00
Speed up storage iteration from within the runtime (#13479)
* Speed up storage iteration from within the runtime * Move the cached iterator into an `Option` * Use `RefCell` in no_std * Simplify the code slightly * Use `Option::replace` * Update doc comment for `next_storage_key_slow`
This commit is contained in:
@@ -107,6 +107,11 @@ pub mod pallet {
|
||||
pub(crate) type UnboundedMap2<T: Config> =
|
||||
StorageMap<Hasher = Blake2_256, Key = u32, Value = Vec<u32>, QueryKind = OptionQuery>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pallet::unbounded]
|
||||
pub(crate) type UnboundedMapTwox<T: Config> =
|
||||
StorageMap<Hasher = Twox64Concat, Key = u32, Value = Vec<u32>, QueryKind = OptionQuery>;
|
||||
|
||||
#[pallet::event]
|
||||
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||
pub enum Event<T: Config> {
|
||||
|
||||
Reference in New Issue
Block a user