chore: cleanup unecessary files/code

This commit is contained in:
Mohamed Sohail 2024-09-18 17:28:29 +03:00
parent 10ff703dfe
commit a95b2b17bb
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
2 changed files with 0 additions and 92 deletions

View File

@ -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
}

View File

@ -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()
// }