Improve dynamic events type sizes API (#61)

* Do not error if type sizes missing: log warn

* Split out EventsSubscriber, allow updating events decoder

* Format code

* Check missing type sizes after registration

* Add example which for submit and watching events
This commit is contained in:
Andrew Jones
2020-01-07 15:14:30 +00:00
committed by GitHub
parent 80663ec6e3
commit b159d0dae1
6 changed files with 130 additions and 57 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ impl<K: Encode, V: Decode + Clone> StorageMap<K, V> {
.chain(&encoded_key)
.cloned()
.collect::<Vec<_>>()
},
}
StorageHasher::Blake2_256 => sp_core::blake2_256(&encoded_key).to_vec(),
StorageHasher::Twox128 => sp_core::twox_128(&encoded_key).to_vec(),
StorageHasher::Twox256 => sp_core::twox_256(&encoded_key).to_vec(),