mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 07:07:13 +00:00
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:
co-authored by
William Banfield
M. J. Fromberger
parent
04bcfecce2
commit
db3044ff3c
@@ -3,6 +3,7 @@ package core
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
tmbytes "github.com/tendermint/tendermint/libs/bytes"
|
||||
@@ -59,8 +60,14 @@ func (env *Environment) Status(ctx context.Context) (*coretypes.ResultStatus, er
|
||||
}
|
||||
}
|
||||
|
||||
var applicationInfo coretypes.ApplicationInfo
|
||||
if abciInfo, err := env.ABCIInfo(ctx); err == nil {
|
||||
applicationInfo.Version = fmt.Sprint(abciInfo.Response.AppVersion)
|
||||
}
|
||||
|
||||
result := &coretypes.ResultStatus{
|
||||
NodeInfo: env.P2PTransport.NodeInfo(),
|
||||
NodeInfo: env.P2PTransport.NodeInfo(),
|
||||
ApplicationInfo: applicationInfo,
|
||||
SyncInfo: coretypes.SyncInfo{
|
||||
LatestBlockHash: latestBlockHash,
|
||||
LatestAppHash: latestAppHash,
|
||||
|
||||
Reference in New Issue
Block a user