Remove Balances Timeout (#9957)

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Nishant Das 2021-12-01 12:03:26 +08:00 committed by GitHub
parent cd6d0d9cf1
commit 7cbef104b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ import (
"context"
"sort"
"strconv"
"time"
types "github.com/prysmaticlabs/eth2-types"
"github.com/prysmaticlabs/prysm/api/pagination"
@ -27,9 +26,6 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
)
// BalancesTimeout for gRPC requests to ListValidatorBalances.
const BalancesTimeout = time.Second * 30
// ListValidatorBalances retrieves the validator balances for a given set of public keys.
// An optional Epoch parameter is provided to request historical validator balances from
// archived, persistent data.
@ -37,8 +33,6 @@ func (bs *Server) ListValidatorBalances(
ctx context.Context,
req *ethpb.ListValidatorBalancesRequest,
) (*ethpb.ValidatorBalances, error) {
ctx, cancel := context.WithTimeout(ctx, BalancesTimeout)
defer cancel()
if int(req.PageSize) > cmd.Get().MaxRPCPageSize {
return nil, status.Errorf(codes.InvalidArgument, "Requested page size %d can not be greater than max size %d",
req.PageSize, cmd.Get().MaxRPCPageSize)