Skip to content

Commit

Permalink
ci: fix ci lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnss committed May 14, 2024
1 parent 21c176c commit 93bfdf6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions trie/inspect_trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type stat struct {
}

type trieStat struct {
lock sync.RWMutex
owner common.Hash
totalNodeStat nodeStat
nodeStatByLevel [16]nodeStat
Expand Down Expand Up @@ -140,7 +139,7 @@ func (trieStat *trieStat) Display(ownerAddress string, treeType string) string {
}
table.SetAlignment(1)

for i, _ := range trieStat.nodeStatByLevel {
for i := range trieStat.nodeStatByLevel {
if trieStat.nodeStatByLevel[i].IsEmpty() {
continue
}
Expand Down Expand Up @@ -191,7 +190,6 @@ func NewInspector(tr *Trie, db Database, stateRootHash common.Hash, blockNum uin

// Run statistics, external call
func (s *Inspector) Run() {

ticker := time.NewTicker(30 * time.Second)
go func() {
defer ticker.Stop()
Expand Down Expand Up @@ -304,14 +302,9 @@ func (s *Inspector) DisplayResult() {
fmt.Println(s.results.account.Display("", "AccountTrie"))
fmt.Println("EOA accounts num: ", s.eoaAccountNums)

type SortedTrie struct {
totalNum uint64
ownerAddress string
}
// display contract trie
for _, st := range s.results.storageTopN {
fmt.Printf(st.Display(st.owner.String(), "StorageTrie"))

fmt.Println(st.Display(st.owner.String(), "StorageTrie"))
}
fmt.Printf("Contract Trie, total trie num: %v, ShortNodeCnt: %v, FullNodeCnt: %v, ValueNodeCnt: %v\n",
s.results.storageTrieNum, s.results.storageTotal.ShortNodeCnt.Load(), s.results.storageTotal.FullNodeCnt.Load(), s.results.storageTotal.ValueNodeCnt.Load())
Expand Down

0 comments on commit 93bfdf6

Please sign in to comment.