mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
fix rust docs for remove storage prefix and take storage item (#9544)
This commit is contained in:
@@ -249,7 +249,7 @@ pub fn put_storage_value<T: Encode>(module: &[u8], item: &[u8], hash: &[u8], val
|
||||
frame_support::storage::unhashed::put(&key, &value);
|
||||
}
|
||||
|
||||
/// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`.
|
||||
/// Remove all items under a storage prefix by the `module`, the map's `item` name and the key `hash`.
|
||||
pub fn remove_storage_prefix(module: &[u8], item: &[u8], hash: &[u8]) {
|
||||
let mut key = vec![0u8; 32 + hash.len()];
|
||||
key[0..16].copy_from_slice(&Twox128::hash(module));
|
||||
@@ -258,7 +258,7 @@ pub fn remove_storage_prefix(module: &[u8], item: &[u8], hash: &[u8]) {
|
||||
frame_support::storage::unhashed::kill_prefix(&key, None);
|
||||
}
|
||||
|
||||
/// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`.
|
||||
/// Take a particular item in storage by the `module`, the map's `item` name and the key `hash`.
|
||||
pub fn take_storage_item<K: Encode + Sized, T: Decode + Sized, H: StorageHasher>(
|
||||
module: &[u8],
|
||||
item: &[u8],
|
||||
|
||||
Reference in New Issue
Block a user