Remove default hasher (#4739)

* remove default hasher from decl_storage!

* fix decl_storage declarations
This commit is contained in:
thiolliere
2020-01-27 18:23:10 +01:00
committed by Gavin Wood
parent 38a01f3c65
commit 76acc96f3a
35 changed files with 193 additions and 141 deletions
@@ -35,18 +35,18 @@ mod no_instance {
trait Store for Module<T: Trait> as FinalKeysNone {
pub Value config(value): u32;
pub Map: map u32 => u32;
pub Map: map hasher(blake2_256) u32 => u32;
pub Map2: map hasher(twox_128) u32 => u32;
pub LinkedMap: linked_map u32 => u32;
pub LinkedMap: linked_map hasher(blake2_256) u32 => u32;
pub LinkedMap2: linked_map hasher(twox_128) u32 => u32;
pub DoubleMap: double_map u32, u32 => u32;
pub DoubleMap: double_map hasher(blake2_256) u32, hasher(blake2_256) u32 => u32;
pub DoubleMap2: double_map hasher(twox_128) u32, hasher(blake2_128) u32 => u32;
pub TestGenericValue get(fn test_generic_value) config(): Option<T::BlockNumber>;
pub TestGenericDoubleMap get(fn foo2) config(test_generic_double_map):
double_map u32, T::BlockNumber => Option<u32>;
double_map hasher(blake2_256) u32, hasher(blake2_256) T::BlockNumber => Option<u32>;
}
}
}
@@ -65,18 +65,18 @@ mod instance {
{
pub Value config(value): u32;
pub Map: map u32 => u32;
pub Map: map hasher(blake2_256) u32 => u32;
pub Map2: map hasher(twox_128) u32 => u32;
pub LinkedMap: linked_map u32 => u32;
pub LinkedMap: linked_map hasher(blake2_256) u32 => u32;
pub LinkedMap2: linked_map hasher(twox_128) u32 => u32;
pub DoubleMap: double_map u32, u32 => u32;
pub DoubleMap: double_map hasher(blake2_256) u32, hasher(blake2_256) u32 => u32;
pub DoubleMap2: double_map hasher(twox_128) u32, hasher(blake2_128) u32 => u32;
pub TestGenericValue get(fn test_generic_value) config(): Option<T::BlockNumber>;
pub TestGenericDoubleMap get(fn foo2) config(test_generic_double_map):
double_map u32, T::BlockNumber => Option<u32>;
double_map hasher(blake2_256) u32, hasher(blake2_256) T::BlockNumber => Option<u32>;
}
add_extra_genesis {
// See `decl_storage` limitation.