webapi: Add expired/missed to /vspinfo.
This commit is contained in:
parent
54e243526e
commit
96b99f35d7
@ -57,6 +57,8 @@ when a VSP is closed will result in an error.
|
||||
"totalvotingwallets":3,
|
||||
"votingwalletsonline":3,
|
||||
"revoked":3,
|
||||
"expired":2,
|
||||
"missed":1,
|
||||
"blockheight":623212,
|
||||
"estimatednetworkproportion":0.048478414
|
||||
}
|
||||
|
||||
2
go.mod
2
go.mod
@ -17,7 +17,7 @@ require (
|
||||
github.com/decred/dcrd/wire v1.6.0
|
||||
github.com/decred/slog v1.2.0
|
||||
github.com/decred/vspd/client/v2 v2.0.0
|
||||
github.com/decred/vspd/types/v2 v2.0.0
|
||||
github.com/decred/vspd/types/v2 v2.1.0
|
||||
github.com/dustin/go-humanize v1.0.1
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/gorilla/sessions v1.2.1
|
||||
|
||||
4
go.sum
4
go.sum
@ -54,8 +54,8 @@ github.com/decred/slog v1.2.0 h1:soHAxV52B54Di3WtKLfPum9OFfWqwtf/ygf9njdfnPM=
|
||||
github.com/decred/slog v1.2.0/go.mod h1:kVXlGnt6DHy2fV5OjSeuvCJ0OmlmTF6LFpEPMu/fOY0=
|
||||
github.com/decred/vspd/client/v2 v2.0.0 h1:gaSF1Bm2/EvoAiSLxNR5fgStrObAO66xmanhedidYIM=
|
||||
github.com/decred/vspd/client/v2 v2.0.0/go.mod h1:IDDviEe/6CuxxrW0PLOcg448enU3YmeElFHledYHw78=
|
||||
github.com/decred/vspd/types/v2 v2.0.0 h1:FaPA+W4OOMRWK+Vk4fyyYdXoVLRMMRQsxzsnSjJjOnI=
|
||||
github.com/decred/vspd/types/v2 v2.0.0/go.mod h1:2xnNqedkt9GuL+pK8uIzDxqYxFlwLRflYFJH64b76n0=
|
||||
github.com/decred/vspd/types/v2 v2.1.0 h1:cUVlmHPeLVsksPRnr2WHsmC2t1Skl6g1WH0HmpcPS7w=
|
||||
github.com/decred/vspd/types/v2 v2.1.0/go.mod h1:2xnNqedkt9GuL+pK8uIzDxqYxFlwLRflYFJH64b76n0=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
||||
|
||||
@ -29,6 +29,8 @@ func (s *Server) vspInfo(c *gin.Context) {
|
||||
TotalVotingWallets: cachedStats.TotalVotingWallets,
|
||||
VotingWalletsOnline: cachedStats.VotingWalletsOnline,
|
||||
Revoked: cachedStats.Expired + cachedStats.Missed,
|
||||
Expired: cachedStats.Expired,
|
||||
Missed: cachedStats.Missed,
|
||||
BlockHeight: cachedStats.BlockHeight,
|
||||
NetworkProportion: cachedStats.NetworkProportion,
|
||||
}, c)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user