rpc: /consensus_state for simplified output

This commit is contained in:
Ethan Buchman
2018-05-13 19:53:54 -04:00
parent 658060150c
commit a41f0d3891
7 changed files with 52 additions and 2 deletions

View File

@ -211,3 +211,10 @@ func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error) {
}
return &ctypes.ResultDumpConsensusState{roundState, peerStates}, nil
}
// UNSTABLE
func ConsensusState() (*ctypes.ResultConsensusState, error) {
// Get self round state.
bz, err := consensusState.GetRoundStateSimpleJSON()
return &ctypes.ResultConsensusState{bz}, err
}