Skip to content

Commit

Permalink
removed bruh moment
Browse files Browse the repository at this point in the history
  • Loading branch information
optclblast committed Jun 2, 2024
1 parent 19c1cf9 commit 918f2f5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions internal/usecase/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -225,10 +222,6 @@ func (t *ethInteractor) streamTransactions(
})

blockToFetch.Sub(blockToFetch, big.NewInt(1))

if blockToFetch.Cmp(endBlock) == 0 {
break
}
}

go func() {
Expand Down

0 comments on commit 918f2f5

Please sign in to comment.