rpc: add application info to status call (#7701)

* rpc/coretypes: add `ApplicationInfo` to `ResultStatus`
* internal/rpc/core: return application version

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
This commit is contained in:
mempirate
2022-01-27 07:24:01 -08:00
committed by GitHub
co-authored by William Banfield M. J. Fromberger
parent 04bcfecce2
commit db3044ff3c
3 changed files with 14 additions and 1 deletions
+5
View File
@@ -116,6 +116,10 @@ type SyncInfo struct {
BackFillBlocksTotal int64 `json:"backfill_blocks_total,string"`
}
type ApplicationInfo struct {
Version string `json:"version"`
}
// Info about the node's validator
type ValidatorInfo struct {
Address bytes.HexBytes
@@ -155,6 +159,7 @@ func (v *ValidatorInfo) UnmarshalJSON(data []byte) error {
// Node Status
type ResultStatus struct {
NodeInfo types.NodeInfo `json:"node_info"`
ApplicationInfo ApplicationInfo `json:"application_info,omitempty"`
SyncInfo SyncInfo `json:"sync_info"`
ValidatorInfo ValidatorInfo `json:"validator_info"`
LightClientInfo types.LightClientInfo `json:"light_client_info,omitempty"`