mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 12:11:58 +00:00
rpc: getHeight helper function
This commit is contained in:
@@ -43,12 +43,11 @@ import (
|
||||
// }
|
||||
// ```
|
||||
func Validators(heightPtr *int64) (*ctypes.ResultValidators, error) {
|
||||
if heightPtr == nil {
|
||||
blockHeight, validators := consensusState.GetValidators()
|
||||
return &ctypes.ResultValidators{blockHeight, validators}, nil
|
||||
height, _, err := getHeight(blockStore, heightPtr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
height := *heightPtr
|
||||
state := consensusState.GetState()
|
||||
validators, err := state.LoadValidators(height)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user