Skip to content

Commit 8d7121c

Browse files
committed
perf: add log
1 parent f63a574 commit 8d7121c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/geth/snapshot.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,7 @@ func inspectStorage(ctx *cli.Context) error {
10751075
defer it.Release()
10761076

10771077
// Inspect key-value database first.
1078+
idx := uint64(0)
10781079
for it.Next() {
10791080
key := it.Key()
10801081
switch {
@@ -1088,6 +1089,8 @@ func inspectStorage(ctx *cli.Context) error {
10881089
if common.Bytes2Hex(account.CodeHash) == types.EmptyCodeHash.String() {
10891090
continue
10901091
}
1092+
fmt.Printf("add task: %d\n", idx)
1093+
idx++
10911094
p.AddTask(common.BytesToHash(key[1:]))
10921095
}
10931096
}

core/state/snapshot/difflayer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ func (dl *diffLayer) Stale() bool {
286286
// Account directly retrieves the account associated with a particular hash in
287287
// the snapshot slim data format.
288288
func (dl *diffLayer) Account(hash common.Hash) (*types.SlimAccount, error) {
289-
fmt.Printf("get account diff %s\n", hash.String())
290289
data, err := dl.AccountRLP(hash)
291290
if err != nil {
292291
return nil, err

core/state/snapshot/disklayer.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package snapshot
1818

1919
import (
2020
"bytes"
21-
"fmt"
2221
"sync"
2322

2423
"github.com/VictoriaMetrics/fastcache"
@@ -97,7 +96,6 @@ func (dl *diskLayer) Accounts() (map[common.Hash]*types.SlimAccount, error) {
9796
// Account directly retrieves the account associated with a particular hash in
9897
// the snapshot slim data format.
9998
func (dl *diskLayer) Account(hash common.Hash) (*types.SlimAccount, error) {
100-
fmt.Printf("get account disk %s\n", hash.String())
10199
data, err := dl.AccountRLP(hash)
102100
if err != nil {
103101
return nil, err

0 commit comments

Comments
 (0)