Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-near committed Nov 15, 2023
1 parent c9c3b1f commit bb1e73f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/fork-network/src/single_shard_storage_mutator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,10 @@ impl SingleShardStorageMutator {
);
let state_root = self.shard_tries.apply_all(&trie_changes, *shard_uid, &mut update);
self.shard_tries.apply_memtrie_changes(&trie_changes, *shard_uid, fake_block_height);
self.shard_tries
.get_mem_tries(*shard_uid)
.unwrap()
.write()
.unwrap()
.delete_until_height(fake_block_height - 1);
// We may not have loaded memtries (some commands don't need to), so check.
if let Some(mem_tries) = self.shard_tries.get_mem_tries(*shard_uid) {
mem_tries.write().unwrap().delete_until_height(fake_block_height - 1);
}
tracing::info!(?shard_uid, num_updates, "committing");
update.set_ser(
DBCol::Misc,
Expand Down

0 comments on commit bb1e73f

Please sign in to comment.