diff --git a/core/src/storage/impls/delta_mpt/cow_node_ref.rs b/core/src/storage/impls/delta_mpt/cow_node_ref.rs index 5090a1c1ae..144aee8fe3 100644 --- a/core/src/storage/impls/delta_mpt/cow_node_ref.rs +++ b/core/src/storage/impls/delta_mpt/cow_node_ref.rs @@ -154,7 +154,7 @@ impl CowNodeRef { impl Drop for CowNodeRef { /// Assert that the CowNodeRef doesn't own something. fn drop(&mut self) { - assert_eq!(false, self.owned); + debug_assert_eq!(false, self.owned); } } diff --git a/core/src/storage/impls/delta_mpt/mem_optimized_trie_node.rs b/core/src/storage/impls/delta_mpt/mem_optimized_trie_node.rs index 3614832c3f..61b4f8745d 100644 --- a/core/src/storage/impls/delta_mpt/mem_optimized_trie_node.rs +++ b/core/src/storage/impls/delta_mpt/mem_optimized_trie_node.rs @@ -55,7 +55,7 @@ pub struct MemOptimizedTrieNode { pub(super) children_table: ChildrenTableDeltaMpt, // Rust automatically moves the value_size field in order to minimize the // total size of the struct. - /// We limit the maximum value length by u16. If it proves insufficient, + /// We limit the maximum value length by u32. If it proves insufficient, /// manage the length and content separately. value_size: u32, value: MaybeInPlaceByteArray, diff --git a/core/src/storage/impls/state.rs b/core/src/storage/impls/state.rs index eb39f0b387..88ffd1a41a 100644 --- a/core/src/storage/impls/state.rs +++ b/core/src/storage/impls/state.rs @@ -486,7 +486,7 @@ impl StateTrait for State { // No need to check v.len() because there are no tombStone values in // snapshot. for (k, v) in snapshot_kvs { - let storage_key = StorageKey::from_delta_mpt_key(&k); + let storage_key = StorageKey::from_key_bytes(&k); self.delete(storage_key)?; if !deleted_keys.contains(&k) { result.push((k, v));