Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Sep 2, 2024
1 parent f7f7f24 commit 12b9bf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
12 changes: 1 addition & 11 deletions client/cmbft_consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 1 addition & 2 deletions client/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 12b9bf7

Please sign in to comment.