Upgdate to latest polkadot & substrate (#263)

* Upgdate to latest polkadot & substrate

* Fix code formatting (cargo fmt)

* Fix unit tests
This commit is contained in:
Alexander Krupenkin
2020-12-10 16:28:02 +03:00
committed by GitHub
parent f327cd96dc
commit ea10fa8230
10 changed files with 630 additions and 527 deletions
+4 -4
View File
@@ -263,8 +263,8 @@ impl<'a, B: BlockT> Externalities for WitnessExt<'a, B> {
self.inner.place_child_storage(child_info, key, value)
}
fn kill_child_storage(&mut self, child_info: &ChildInfo) {
self.inner.kill_child_storage(child_info)
fn kill_child_storage(&mut self, child_info: &ChildInfo, limit: Option<u32>) -> bool {
self.inner.kill_child_storage(child_info, limit)
}
fn clear_prefix(&mut self, prefix: &[u8]) {
@@ -450,9 +450,9 @@ fn host_default_child_storage_clear(storage_key: &[u8], key: &[u8]) {
with_externalities(|ext| ext.place_child_storage(&child_info, key.to_vec(), None))
}
fn host_default_child_storage_storage_kill(storage_key: &[u8]) {
fn host_default_child_storage_storage_kill(storage_key: &[u8], limit: Option<u32>) -> bool {
let child_info = ChildInfo::new_default(storage_key);
with_externalities(|ext| ext.kill_child_storage(&child_info))
with_externalities(|ext| ext.kill_child_storage(&child_info, limit))
}
fn host_default_child_storage_exists(storage_key: &[u8], key: &[u8]) -> bool {