Implement all storage after prefix (#4227)

* Implement all storage after prefix

* fix test, bump version and fix doc

* bump metadata version

* Update frame/support/procedural/src/storage/storage_struct.rs
This commit is contained in:
thiolliere
2019-11-27 19:23:20 +01:00
committed by Gavin Wood
parent dcaabbaacf
commit f4035cd5ac
15 changed files with 310 additions and 325 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ impl<V: FullCodec> StorageQuery<V> {
/// Create a storage query for a value in a StorageMap.
pub fn map<St: StorageMap<K, V>, K: FullEncode>(key: K) -> Self {
Self {
key: StorageKey(St::storage_map_final_key(key).as_ref().to_vec()),
key: StorageKey(St::storage_map_final_key(key)),
_spook: PhantomData,
}
}
@@ -116,7 +116,7 @@ impl<V: FullCodec> StorageQuery<V> {
/// Create a storage query for a value in a StorageLinkedMap.
pub fn linked_map<St: StorageLinkedMap<K, V>, K: FullCodec>(key: K) -> Self {
Self {
key: StorageKey(St::storage_linked_map_final_key(key).as_ref().to_vec()),
key: StorageKey(St::storage_linked_map_final_key(key)),
_spook: PhantomData,
}
}