From 12b9bf7f000d2d46563d48f812dbe84939b5a3ba Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Mon, 2 Sep 2024 18:34:08 -0500 Subject: [PATCH] simplify --- client/cmbft_consensus.go | 12 +----------- client/consensus.go | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/client/cmbft_consensus.go b/client/cmbft_consensus.go index 15aa5fe3d..a33339105 100644 --- a/client/cmbft_consensus.go +++ b/client/cmbft_consensus.go @@ -98,18 +98,8 @@ func (r CometRPCClient) GetValidators(ctx context.Context, height *int64, page * return nil, fmt.Errorf("failed to get validators: %w", err) } - vals := make([]*tmtypes.Validator, len(v.Validators)) - for i, val := range v.Validators { - vals[i] = &tmtypes.Validator{ - Address: val.Address, - PubKey: val.PubKey, - VotingPower: val.VotingPower, - ProposerPriority: val.ProposerPriority, - } - } - return &ResultValidators{ - Validators: vals, + Validators: v.Validators, }, nil } diff --git a/client/consensus.go b/client/consensus.go index e680052a5..f552445e3 100644 --- a/client/consensus.go +++ b/client/consensus.go @@ -15,7 +15,7 @@ import ( rbytes "github.com/cosmos/relayer/v2/client/bytes" ) -// TODO(reece): get off CometBFT types into internal relayer. +// TODO(reece): get off cometbft types into internal relayer. type ConsensusClient interface { GetBlockTime(ctx context.Context, height uint64) (time.Time, error) GetStatus(ctx context.Context) (*Status, error) @@ -79,7 +79,6 @@ type ResultTxSearch struct { type ResultValidators struct { Validators []*tmtypes.Validator `json:"validators"` - // Validators []Validator // TODO: requires some helper methods on the gordian side for the query to update set } type Validator struct {