@@ -261,14 +261,17 @@ impl HashBuilder {
261
261
let leaf_node = LeafNodeRef :: new ( & short_node_key, leaf_value) ;
262
262
self . rlp_buf . clear ( ) ;
263
263
let rlp = leaf_node. rlp ( & mut self . rlp_buf ) ;
264
+
265
+ let path = current. slice ( ..len_from) ;
264
266
trace ! (
265
267
target: "trie::hash_builder" ,
268
+ ?path,
266
269
?leaf_node,
267
270
?rlp,
268
271
"pushing leaf node" ,
269
272
) ;
270
273
self . stack . push ( rlp) ;
271
- self . retain_proof_from_buf ( & current . slice ( ..len_from ) ) ;
274
+ self . retain_proof_from_buf ( & path ) ;
272
275
}
273
276
HashBuilderValueRef :: Hash ( hash) => {
274
277
trace ! ( target: "trie::hash_builder" , ?hash, "pushing branch node hash" ) ;
@@ -293,14 +296,17 @@ impl HashBuilder {
293
296
294
297
self . rlp_buf . clear ( ) ;
295
298
let rlp = extension_node. rlp ( & mut self . rlp_buf ) ;
299
+
300
+ let path = current. slice ( ..len_from) ;
296
301
trace ! (
297
302
target: "trie::hash_builder" ,
303
+ ?path,
298
304
?extension_node,
299
305
?rlp,
300
306
"pushing extension node" ,
301
307
) ;
302
308
self . stack . push ( rlp) ;
303
- self . retain_proof_from_buf ( & current . slice ( ..len_from ) ) ;
309
+ self . retain_proof_from_buf ( & path ) ;
304
310
self . resize_masks ( len_from) ;
305
311
}
306
312
@@ -358,7 +364,15 @@ impl HashBuilder {
358
364
359
365
self . rlp_buf . clear ( ) ;
360
366
let rlp = branch_node. rlp ( & mut self . rlp_buf ) ;
361
- self . retain_proof_from_buf ( & current. slice ( ..len) ) ;
367
+ let path = current. slice ( ..len) ;
368
+ trace ! (
369
+ target: "trie::hash_builder" ,
370
+ ?path,
371
+ ?branch_node,
372
+ ?rlp,
373
+ "pushing branch node" ,
374
+ ) ;
375
+ self . retain_proof_from_buf ( & path) ;
362
376
363
377
// Clears the stack from the branch node elements
364
378
let first_child_idx = self . stack . len ( ) - state_mask. count_ones ( ) as usize ;
@@ -370,7 +384,6 @@ impl HashBuilder {
370
384
) ;
371
385
self . stack . resize_with ( first_child_idx, Default :: default) ;
372
386
373
- trace ! ( target: "trie::hash_builder" , ?rlp, "pushing branch node with {state_mask:?} mask from stack" ) ;
374
387
self . stack . push ( rlp) ;
375
388
children
376
389
}
@@ -401,7 +414,6 @@ impl HashBuilder {
401
414
children,
402
415
( len == 0 ) . then ( || self . current_root ( ) ) ,
403
416
) ;
404
- trace ! ( target: "trie::hash_builder" , ?node, "intermediate node" ) ;
405
417
self . updated_branch_nodes . as_mut ( ) . unwrap ( ) . insert ( common_prefix, node) ;
406
418
}
407
419
}
0 commit comments