Fix unable to query status endpoint issue. (#103)

* Fix unable to query status endpoint issue.

* Revert "Fix unable to query status endpoint issue."

This reverts commit 73f02cdaea24dee88c47674dceed4f2513abac87.

* Replace amino unsafe tag for float fields.
This commit is contained in:
rao yunkun 2018-06-28 16:12:27 +08:00 committed by Anton Kaliaev
parent 48e1227f92
commit db419a308e
3 changed files with 14 additions and 14 deletions

View File

@ -35,10 +35,10 @@ type EventMetric struct {
// filled in from the Meter
Count int64 `json:"count"`
Rate1 float64 `json:"rate_1" wire:"unsafe"`
Rate5 float64 `json:"rate_5" wire:"unsafe"`
Rate15 float64 `json:"rate_15" wire:"unsafe"`
RateMean float64 `json:"rate_mean" wire:"unsafe"`
Rate1 float64 `json:"rate_1" amino:"unsafe"`
Rate5 float64 `json:"rate_5" amino:"unsafe"`
Rate15 float64 `json:"rate_15" amino:"unsafe"`
RateMean float64 `json:"rate_mean" amino:"unsafe"`
// so the event can have effects in the eventmeter's consumer. runs in a go
// routine.

View File

@ -11,7 +11,7 @@ import (
// UptimeData stores data for how long network has been running.
type UptimeData struct {
StartTime time.Time `json:"start_time"`
Uptime float64 `json:"uptime" wire:"unsafe"` // percentage of time we've been healthy, ever
Uptime float64 `json:"uptime" amino:"unsafe"` // percentage of time we've been healthy, ever
totalDownTime time.Duration // total downtime (only updated when we come back online)
wentDown time.Time
@ -35,11 +35,11 @@ const (
type Network struct {
Height int64 `json:"height"`
AvgBlockTime float64 `json:"avg_block_time" wire:"unsafe"` // ms (avg over last minute)
AvgBlockTime float64 `json:"avg_block_time" amino:"unsafe"` // ms (avg over last minute)
blockTimeMeter metrics.Meter
AvgTxThroughput float64 `json:"avg_tx_throughput" wire:"unsafe"` // tx/s (avg over last minute)
AvgTxThroughput float64 `json:"avg_tx_throughput" amino:"unsafe"` // tx/s (avg over last minute)
txThroughputMeter metrics.Meter
AvgBlockLatency float64 `json:"avg_block_latency" wire:"unsafe"` // ms (avg over last minute)
AvgBlockLatency float64 `json:"avg_block_latency" amino:"unsafe"` // ms (avg over last minute)
blockLatencyMeter metrics.Meter
NumValidators int `json:"num_validators"`

View File

@ -26,7 +26,7 @@ type Node struct {
Name string `json:"name"`
Online bool `json:"online"`
Height int64 `json:"height"`
BlockLatency float64 `json:"block_latency" wire:"unsafe"` // ms, interval between block commits
BlockLatency float64 `json:"block_latency" amino:"unsafe"` // ms, interval between block commits
// em holds the ws connection. Each eventMeter callback is called in a separate go-routine.
em eventMeter