Skip to content

Commit c5c5e0d

Browse files
authored
consensus/clique: fix struct tags for status API (#20316)
Also unexport the status struct.
1 parent 3f4a875 commit c5c5e0d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎consensus/clique/api.go‎

Lines changed: 4 additions & 4 deletions
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)