prysmaticlabs / prysm

Types of function parameters can be combined CRT-A0017
Style
Minor
2 occurrences in this check
func(ctx context.Context, lowerBoundBlk uint64, targetTime uint64) (*types.HeaderInfo, error) could be replaced with func(ctx context.Context, lowerBoundBlk, targetTime uint64) (*types.HeaderInfo, error)
181
182// Performs a search to find a target eth1 block which is just earlier than or equal to the
183// target time. This method is used when head.time < targetTime
184func (s *Service) findMinTargetEth1Block(ctx context.Context, lowerBoundBlk uint64, targetTime uint64) (*types.HeaderInfo, error) {185	for bn := lowerBoundBlk; ; bn++ {
186		if ctx.Err() != nil {
187			return nil, ctx.Err()
func(ctx context.Context, upperBoundBlk uint64, targetTime uint64) (*types.HeaderInfo, error) could be replaced with func(ctx context.Context, upperBoundBlk, targetTime uint64) (*types.HeaderInfo, error)
164
165// Performs a search to find a target eth1 block which is earlier than or equal to the
166// target time. This method is used when head.time > targetTime
167func (s *Service) findMaxTargetEth1Block(ctx context.Context, upperBoundBlk uint64, targetTime uint64) (*types.HeaderInfo, error) {168	for bn := upperBoundBlk; ; bn-- {
169		if ctx.Err() != nil {
170			return nil, ctx.Err()