From b470dc1a5f0945c6b579e74d93ae0cb57789b1bc Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Tue, 20 Feb 2024 12:30:24 +0100 Subject: [PATCH] Search all epochs in parallel --- multiepoch-getTransaction.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/multiepoch-getTransaction.go b/multiepoch-getTransaction.go index f290cf6e..e5da594e 100644 --- a/multiepoch-getTransaction.go +++ b/multiepoch-getTransaction.go @@ -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]