Skip to content

Commit

Permalink
refactor: Remove unnecessary code for deduplicating epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jul 20, 2023
1 parent bd977af commit 5a4575f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pkg/sentry/ethereum/services/duties.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,6 @@ func (m *DutiesService) RequiredEpochDuties(ctx context.Context) []phase0.Epoch
phase0.Epoch(epochNumber),
}

final := map[phase0.Epoch]struct{}{}

// Deduplicate in case the current epoch is below epoch 3.
for _, epoch := range epochs {
final[epoch] = struct{}{}
}

epochs = make([]phase0.Epoch, 0, len(final))
for epoch := range final {
epochs = append(epochs, epoch)
}

return epochs
}

Expand Down

0 comments on commit 5a4575f

Please sign in to comment.