Skip to content

Commit 8070f4a

Browse files
committed
reset
1 parent 9417bbb commit 8070f4a

File tree

4 files changed

+0
-81
lines changed

4 files changed

+0
-81
lines changed

core/state/statedb.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,11 +1464,3 @@ func (s *StateDB) Witness() *stateless.Witness {
14641464
func (s *StateDB) AccessEvents() *AccessEvents {
14651465
return s.accessEvents
14661466
}
1467-
1468-
func (s *StateDB) BeginTrieDepthWindow() {
1469-
trie.StateDepthMetricsStartBlock()
1470-
}
1471-
1472-
func (s *StateDB) EndTrieDepthWindow() {
1473-
trie.StateDepthMetricsEndBlock()
1474-
}

core/state_processor.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
6464
allLogs []*types.Log
6565
gp = new(GasPool).AddGas(block.GasLimit())
6666
)
67-
// Start the trie depth metrics window
68-
statedb.BeginTrieDepthWindow()
69-
defer statedb.EndTrieDepthWindow()
7067

7168
// Mutate the block and state according to any hard-fork specs
7269
if p.config.DAOForkSupport && p.config.DAOForkBlock != nil && p.config.DAOForkBlock.Cmp(block.Number()) == 0 {

trie/trie.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ func (t *Trie) update(key, value []byte) error {
326326

327327
func (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
}

trie/trie_metrics.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)