Translation for linked map (#4052)

* make linked_map generic functions better

* implement translation of linked map

* proc-macro for linked map updated

* test linked map migration

* account for instances

* address grumbles

* cut map short if migration fails
This commit is contained in:
Robert Habermeier
2019-11-12 19:17:42 +01:00
committed by Gavin Wood
parent 05391f7e04
commit 2eac9f5b1b
6 changed files with 249 additions and 64 deletions
@@ -156,7 +156,7 @@ fn final_keys_default_instance() {
assert_eq!(unhashed::get::<u32>(&hashing::blake2_256(&k)), Some(2u32));
assert_eq!(unhashed::get::<u32>(&hashing::blake2_256(&head)), Some(1u32));
< instance::LinkedMap2<instance::DefaultInstance>>::insert(1, 2);
<instance::LinkedMap2<instance::DefaultInstance>>::insert(1, 2);
let mut k = b"FinalKeysSome LinkedMap2".to_vec();
k.extend(1u32.encode());
assert_eq!(unhashed::get::<u32>(&hashing::twox_128(&k)), Some(2u32));