@@ -326,10 +326,6 @@ func (t *Trie) update(key, value []byte) error {
326326
327327func (t * Trie ) insert (n node , prefix , key []byte , value node ) (bool , node , error ) {
328328 if len (key ) == 0 {
329- if t .owner == (common.Hash {}) {
330- stateDepthAggregator .record (int64 (len (prefix )))
331- }
332-
333329 if v , ok := n .(valueNode ); ok {
334330 return ! bytes .Equal (v , value .(valueNode )), value , nil
335331 }
@@ -449,9 +445,6 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
449445 // it in the deletion set. The same the valueNode doesn't
450446 // need to be tracked at all since it's always embedded.
451447 t .tracer .onDelete (prefix )
452- if t .owner == (common.Hash {}) {
453- stateDepthAggregator .record (int64 (len (prefix )))
454- }
455448 return true , nil , nil // remove n entirely for whole matches
456449 }
457450 // The key is longer than n.Key. Remove the remaining suffix
@@ -474,9 +467,6 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
474467 // always creates a new slice) instead of append to
475468 // avoid modifying n.Key since it might be shared with
476469 // other nodes.
477- if t .owner == (common.Hash {}) {
478- stateDepthAggregator .record (int64 (len (prefix ) + len (key )))
479- }
480470 return true , & shortNode {concat (n .Key , child .Key ... ), child .Val , t .newFlag ()}, nil
481471 default :
482472 return true , & shortNode {n .Key , child , t .newFlag ()}, nil
@@ -535,10 +525,6 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
535525 // Mark the original short node as deleted since the
536526 // value is embedded into the parent now.
537527 t .tracer .onDelete (append (prefix , byte (pos )))
538- if t .owner == (common.Hash {}) {
539- stateDepthAggregator .record (int64 (len (prefix ) + 1 ))
540- }
541-
542528 k := append ([]byte {byte (pos )}, cnode .Key ... )
543529 return true , & shortNode {k , cnode .Val , t .newFlag ()}, nil
544530 }
0 commit comments