Skip to content

Commit

Permalink
disable clean index logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitprincess committed Aug 30, 2023
1 parent 517b950 commit 4fe914b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions indexer/run_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ func (ns *Indexer) Check(startFrom uint64, stopAt uint64) {
stopAt = ns.GetBestBlock() - 1
}
ns.fixIndex(startFrom, stopAt)
err := ns.cleanIndex()
if err != nil {
ns.log.Warn().Err(err).Msg("Failed to clean unexpected data")
}

// remove clean index logic
// err := ns.cleanIndex()
// if err != nil {
// ns.log.Warn().Err(err).Msg("Failed to clean unexpected data")
// }
}

func (ns *Indexer) fixIndex(startFrom uint64, stopAt uint64) {
Expand Down Expand Up @@ -93,7 +95,7 @@ func (ns *Indexer) cleanIndex() error {
// 1. get token list
tokens := make(map[string]bool)
ns.ScrollToken(func(tokenDoc *doc.EsToken) {
tokens[tokenDoc.Name] = true
tokens[tokenDoc.TokenAddress] = true
})

// 2. get token transfer
Expand Down

0 comments on commit 4fe914b

Please sign in to comment.