Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 308a5b3

Browse files
fjlelizabethengelman
authored andcommitted
consensus/clique: fix struct tags for status API (ethereum#20316)
Also unexport the status struct.
1 parent 2bd68c3 commit 308a5b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

consensus/clique/api.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ func (api *API) Discard(address common.Address) {
120120
delete(api.clique.proposals, address)
121121
}
122122

123-
type Status struct {
123+
type status struct {
124124
InturnPercent float64 `json:"inturnPercent"`
125-
SigningStatus map[common.Address]int `json:"sealerActivity""`
125+
SigningStatus map[common.Address]int `json:"sealerActivity"`
126126
NumBlocks uint64 `json:"numBlocks"`
127127
}
128128

129129
// Status returns the status of the last N blocks,
130130
// - the number of active signers,
131131
// - the number of signers,
132132
// - the percentage of in-turn blocks
133-
func (api *API) Status() (*Status, error) {
133+
func (api *API) Status() (*status, error) {
134134
var (
135135
numBlocks = uint64(64)
136136
header = api.chain.CurrentHeader()
@@ -169,7 +169,7 @@ func (api *API) Status() (*Status, error) {
169169
}
170170
signStatus[sealer]++
171171
}
172-
return &Status{
172+
return &status{
173173
InturnPercent: float64((100 * optimals)) / float64(numBlocks),
174174
SigningStatus: signStatus,
175175
NumBlocks: numBlocks,

0 commit comments

Comments
 (0)