From 958cf437d1e5f831bea60d949602b0c1d5ec6140 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Fri, 17 Jan 2020 16:12:30 +0300 Subject: [PATCH] add missing bits --- client/db/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index 29e17a5f0c7de..be569194972cc 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -1149,6 +1149,7 @@ impl Backend { changes_trie_config_update, changes_trie_cache_ops, )?); + self.state_usage.merge_sm(operation.old_state.usage_info()); let cache = operation.old_state.release(); // release state reference so that it can be finalized if finalized { @@ -1619,6 +1620,7 @@ impl sc_client_api::backend::Backend for Backend { } fn destroy_state(&self, state: Self::State) -> ClientResult<()> { + self.state_usage.merge_sm(state.usage_info()); if let Some(hash) = state.cache.parent_hash.clone() { let is_best = self.blockchain.meta.read().best_hash == hash; state.release().sync_cache(&[], &[], vec![], vec![], None, None, is_best);