Skip to content

Commit

Permalink
pass linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaiba committed Dec 11, 2024
1 parent 6d8ef47 commit 8312d86
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions node/services/jsonrpc/chainsvc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,21 +247,21 @@ func (svc *Service) Genesis(ctx context.Context, req *chainjson.GenesisRequest)
func (svc *Service) Validators(ctx context.Context, req *chainjson.ValidatorsRequest) (*chainjson.ValidatorsResponse, *jsonrpc.Error) {
panic("Plz inject voting dependency")
// should be able to get validator set at req.Height
vals := svc.voting.GetValidators()

pbValidators := make([]*ktypes.Validator, len(vals))
for i, vi := range vals {
pbValidators[i] = &ktypes.Validator{
Role: vi.Role,
PubKey: vi.PubKey,
Power: vi.Power,
}
}

return &chainjson.ValidatorsResponse{
Height: svc.blockchain.BlockHeight(ctx),
Validators: nil,
}, nil
//vals := svc.voting.GetValidators()
//
//pbValidators := make([]*ktypes.Validator, len(vals))
//for i, vi := range vals {
// pbValidators[i] = &ktypes.Validator{
// Role: vi.Role,
// PubKey: vi.PubKey,
// Power: vi.Power,
// }
//}
//
//return &chainjson.ValidatorsResponse{
// Height: svc.blockchain.BlockHeight(ctx),
// Validators: nil,
//}, nil
}

// UnconfirmedTxs returns the unconfirmed txs. Default return 10 txs, max return 50 txs.
Expand Down

0 comments on commit 8312d86

Please sign in to comment.