Skip to content

Commit 0bdcfa3

Browse files
cleanup
1 parent 9e053ba commit 0bdcfa3

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

src/ingester/gap/sequences.rs

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,18 @@ impl StateUpdateSequences {
7373
tree_str, address.queue_index
7474
);
7575

76-
// Check if this is an AddressV1 tree incorrectly in batch operations
76+
// Check if this tree should not be in batch operations
7777
if let Some(info) = QUEUE_TREE_MAPPING.get(&tree_str) {
78-
if info.tree_type == light_compressed_account::TreeType::AddressV1 {
78+
// batch_new_addresses should only contain AddressV2 trees
79+
if info.tree_type != light_compressed_account::TreeType::AddressV2 {
7980
tracing::error!(
80-
"AddressV1 tree {tree_str} found in batch_new_addresses - this should not happen! \
81+
"{:?} wrong tree {tree_str} found in batch_new_addresses \
82+
Only AddressV2 trees should be in batch new address operations. \
8183
queue_index: {}, slot: {}, signature: {}",
82-
address.queue_index, slot, signature
84+
info.tree_type,
85+
address.queue_index,
86+
slot,
87+
signature
8388
);
8489
// Skip this invalid data
8590
continue;
@@ -150,7 +155,13 @@ impl StateUpdateSequences {
150155
light_compressed_account::TreeType::AddressV1 => {
151156
updates.insert(tree_str, TreeTypeSeq::AddressV1(max_entry.clone()));
152157
}
153-
_ => {}
158+
tree_type => {
159+
tracing::error!(
160+
"Unhandled tree type {:?} for tree {} in indexed_tree_seqs",
161+
tree_type,
162+
tree_str
163+
);
164+
}
154165
}
155166
}
156167
}
@@ -201,7 +212,13 @@ impl StateUpdateSequences {
201212
light_compressed_account::TreeType::StateV1 => {
202213
updates.insert(tree_str, TreeTypeSeq::StateV1(max_entry.clone()));
203214
}
204-
_ => {}
215+
tree_type => {
216+
tracing::error!(
217+
"Unhandled tree type {:?} for tree {} in out_account_leaf_indexes",
218+
tree_type,
219+
tree_str
220+
);
221+
}
205222
}
206223
}
207224
}

0 commit comments

Comments
 (0)