mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2025-02-22 16:00:37 +01:00
chore: cleanup unecessary files/code
This commit is contained in:
parent
10ff703dfe
commit
a95b2b17bb
19
internal/cache/cache.go
vendored
19
internal/cache/cache.go
vendored
@ -39,24 +39,5 @@ func New(o CacheOpts) (Cache, error) {
|
||||
o.Logg.Warn("invalid cache type, using default type (map)")
|
||||
}
|
||||
|
||||
// geSmartContracts, err := o.Chain.Provider().GetGESmartContracts(
|
||||
// context.Background(),
|
||||
// o.Registries,
|
||||
// )
|
||||
// if err != nil {
|
||||
// return nil, fmt.Errorf("cache could not bootstrap GE smart contracts: err %v", err)
|
||||
// }
|
||||
|
||||
// for k, v := range geSmartContracts {
|
||||
// cache.Add(k, v)
|
||||
// }
|
||||
// for _, address := range o.Watchlist {
|
||||
// cache.Add(address, false)
|
||||
// }
|
||||
// for _, address := range o.Blacklist {
|
||||
// cache.Remove(address)
|
||||
// }
|
||||
// o.Logg.Info("cache bootstrap complete", "cached_addresses", cache.Size())
|
||||
|
||||
return cache, nil
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
package queue
|
||||
|
||||
//
|
||||
// import (
|
||||
// "context"
|
||||
// "log/slog"
|
||||
|
||||
// "github.com/alitto/pond"
|
||||
// "github.com/grassrootseconomics/celo-tracker/internal/processor"
|
||||
// )
|
||||
|
||||
// type (
|
||||
// QueueOpts struct {
|
||||
// QueueSize int
|
||||
// Logg *slog.Logger
|
||||
// Processor *processor.Processor
|
||||
// Pool *pond.WorkerPool
|
||||
// }
|
||||
|
||||
// Queue struct {
|
||||
// logg *slog.Logger
|
||||
// processChan chan uint64
|
||||
// stopSignal chan interface{}
|
||||
// processor *processor.Processor
|
||||
// pool *pond.WorkerPool
|
||||
// }
|
||||
// )
|
||||
|
||||
// func New(o QueueOpts) *Queue {
|
||||
// return &Queue{
|
||||
// logg: o.Logg,
|
||||
// processChan: make(chan uint64, o.QueueSize),
|
||||
// stopSignal: make(chan interface{}),
|
||||
// processor: o.Processor,
|
||||
// pool: o.Pool,
|
||||
// }
|
||||
// }
|
||||
|
||||
// func (q *Queue) Stop() {
|
||||
// q.stopSignal <- struct{}{}
|
||||
// }
|
||||
|
||||
// func (q *Queue) Process() {
|
||||
// for {
|
||||
// select {
|
||||
// case <-q.stopSignal:
|
||||
// q.logg.Info("shutdown signal received stopping queue processing")
|
||||
// return
|
||||
// case block, ok := <-q.processChan:
|
||||
// if !ok {
|
||||
// return
|
||||
// }
|
||||
// q.pool.Submit(func() {
|
||||
// err := q.processor.ProcessBlock(context.Background(), block)
|
||||
// if err != nil {
|
||||
// q.logg.Error("block processor error", "block_number", block, "error", err)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// func (q *Queue) Push(block uint64) {
|
||||
// q.processChan <- block
|
||||
// }
|
||||
|
||||
// func (q *Queue) Size() int {
|
||||
// return len(q.processChan)
|
||||
// }
|
||||
|
||||
// func (q *Queue) WaitingSize() uint64 {
|
||||
// return q.pool.WaitingTasks()
|
||||
// }
|
Loading…
Reference in New Issue
Block a user