Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
add missing bits (#4660)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikVolf authored Jan 17, 2020
1 parent 2d15616 commit 10bebed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ impl<Block: BlockT> Backend<Block> {
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 {
Expand Down Expand Up @@ -1619,6 +1620,7 @@ impl<Block: BlockT> sc_client_api::backend::Backend<Block> for Backend<Block> {
}

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);
Expand Down

0 comments on commit 10bebed

Please sign in to comment.