@@ -73,13 +73,18 @@ impl StateUpdateSequences {
73
73
tree_str, address. queue_index
74
74
) ;
75
75
76
- // Check if this is an AddressV1 tree incorrectly in batch operations
76
+ // Check if this tree should not be in batch operations
77
77
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 {
79
80
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. \
81
83
queue_index: {}, slot: {}, signature: {}",
82
- address. queue_index, slot, signature
84
+ info. tree_type,
85
+ address. queue_index,
86
+ slot,
87
+ signature
83
88
) ;
84
89
// Skip this invalid data
85
90
continue ;
@@ -150,7 +155,13 @@ impl StateUpdateSequences {
150
155
light_compressed_account:: TreeType :: AddressV1 => {
151
156
updates. insert ( tree_str, TreeTypeSeq :: AddressV1 ( max_entry. clone ( ) ) ) ;
152
157
}
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
+ }
154
165
}
155
166
}
156
167
}
@@ -201,7 +212,13 @@ impl StateUpdateSequences {
201
212
light_compressed_account:: TreeType :: StateV1 => {
202
213
updates. insert ( tree_str, TreeTypeSeq :: StateV1 ( max_entry. clone ( ) ) ) ;
203
214
}
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
+ }
205
222
}
206
223
}
207
224
}
0 commit comments