mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
Remove Balances Timeout (#9957)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
parent
cd6d0d9cf1
commit
7cbef104b0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user