Skip to content

Commit

Permalink
Search all epochs in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Feb 20, 2024
1 parent 90d2a10 commit b470dc1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions multiepoch-getTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,7 @@ func (multi *MultiEpoch) findEpochNumberFromSignature(ctx context.Context, sig s
return 0, ErrNotFound
}

for _, epochNumber := range found {
epoch, err := multi.GetEpoch(epochNumber)
if err != nil {
return 0, fmt.Errorf("failed to get epoch %d: %v", epochNumber, err)
}
if _, err := epoch.FindCidFromSignature(ctx, sig); err == nil {
return epochNumber, nil
}
}
return 0, ErrNotFound

// TODO: Search all epochs in parallel:
// Search all epochs in parallel:
wg := NewFirstResponse(ctx, multi.options.EpochSearchConcurrency)
for i := range numbers {
epochNumber := numbers[i]
Expand Down

0 comments on commit b470dc1

Please sign in to comment.