From 918f2f5a5ff480cee055d2bf3f5afb0cc2765a1b Mon Sep 17 00:00:00 2001 From: optclblast Date: Sun, 2 Jun 2024 12:02:33 +0300 Subject: [PATCH] removed bruh moment --- internal/usecase/eth.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/usecase/eth.go b/internal/usecase/eth.go index 0cb22e0..4f8d097 100644 --- a/internal/usecase/eth.go +++ b/internal/usecase/eth.go @@ -192,14 +192,11 @@ func (t *ethInteractor) streamTransactions( txChan chan<- *entities.Transaction, ) { blockToFetch := new(big.Int).Set(headBlock) - endBlock := big.NewInt(0) - blocksChan := make(chan *entities.Block, numBlocks) + fetchPool := pond.New(fetchWorkersPoolSize, numBlocks) var fetchWg sync.WaitGroup - fetchPool := pond.New(fetchWorkersPoolSize, numBlocks) - for i := 0; i < numBlocks; i++ { blockNumber := entities.BlockNumber("0x" + blockToFetch.Text(16)) @@ -225,10 +222,6 @@ func (t *ethInteractor) streamTransactions( }) blockToFetch.Sub(blockToFetch, big.NewInt(1)) - - if blockToFetch.Cmp(endBlock) == 0 { - break - } } go func() {