Skip to content

Commit

Permalink
api: report InitialHeight in /chain/info endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed May 8, 2024
1 parent 95afb48 commit 4efa7e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ type ChainInfo struct {
ElectionCount uint64 `json:"electionCount" example:"120"`
OrganizationCount uint64 `json:"organizationCount" example:"20"`
GenesisTime time.Time `json:"genesisTime" format:"date-time" example:"2022-11-17T18:00:57.379551614Z"`
InitialHeight uint32 `json:"initialHeight" example:"5467"`
Height uint32 `json:"height" example:"5467"`
Syncing bool `json:"syncing" example:"true"`
Timestamp int64 `json:"blockTimestamp" swaggertype:"string" format:"date-time" example:"2022-11-17T18:00:57.379551614Z"`
Expand Down
1 change: 1 addition & 0 deletions api/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ func (a *API) chainInfoHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext)
Timestamp: a.vocapp.Timestamp(),
VoteCount: voteCount,
GenesisTime: a.vocapp.Genesis().GenesisTime,
InitialHeight: uint32(a.vocapp.Genesis().InitialHeight),
CircuitVersion: circuit.Version(),
MaxCensusSize: maxCensusSize,
NetworkCapacity: networkCapacity,
Expand Down

0 comments on commit 4efa7e1

Please sign in to comment.