diff --git a/core/store/src/cold_storage.rs b/core/store/src/cold_storage.rs
index 3898308fae1..f3d8066d1b6 100644
--- a/core/store/src/cold_storage.rs
+++ b/core/store/src/cold_storage.rs
@@ -1,6 +1,6 @@
use crate::columns::DBKeyType;
use crate::db::{ColdDB, COLD_HEAD_KEY, HEAD_KEY};
-use crate::trie::TrieRefcountChange;
+use crate::trie::TrieRefcountAddition;
use crate::{metrics, DBCol, DBTransaction, Database, Store, TrieChanges};
use borsh::BorshDeserialize;
@@ -475,7 +475,11 @@ impl StoreWithCache<'_> {
option_to_not_found(self.get_ser(column, key), format_args!("{:?}: {:?}", column, key))
}
- pub fn insert_state_to_cache_from_op(&mut self, op: &TrieRefcountChange, shard_uid_key: &[u8]) {
+ pub fn insert_state_to_cache_from_op(
+ &mut self,
+ op: &TrieRefcountAddition,
+ shard_uid_key: &[u8],
+ ) {
debug_assert_eq!(
DBCol::State.key_type(),
&[DBKeyType::ShardUId, DBKeyType::TrieNodeOrValueHash]
diff --git a/core/store/src/trie/insert_delete.rs b/core/store/src/trie/insert_delete.rs
index 0d7a5ebd776..050d467ac3d 100644
--- a/core/store/src/trie/insert_delete.rs
+++ b/core/store/src/trie/insert_delete.rs
@@ -1,21 +1,18 @@
-use std::collections::HashMap;
-
-use borsh::BorshSerialize;
-
-use near_primitives::hash::{hash, CryptoHash};
-use near_primitives::state::ValueRef;
-
+use super::TrieRefcountDeltaMap;
use crate::trie::nibble_slice::NibbleSlice;
use crate::trie::{
Children, NodeHandle, RawTrieNode, RawTrieNodeWithSize, StorageHandle, StorageValueHandle,
TrieNode, TrieNodeWithSize, ValueHandle,
};
use crate::{StorageError, Trie, TrieChanges};
+use borsh::BorshSerialize;
+use near_primitives::hash::{hash, CryptoHash};
+use near_primitives::state::ValueRef;
pub(crate) struct NodesStorage {
nodes: Vec