Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions consensus/clique/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (api *API) Discard(address common.Address) {
delete(api.clique.proposals, address)
}

type status struct {
type Status struct {
InturnPercent float64 `json:"inturnPercent"`
SigningStatus map[common.Address]int `json:"sealerActivity"`
NumBlocks uint64 `json:"numBlocks"`
Expand All @@ -130,7 +130,7 @@ type status struct {
// - the number of active signers,
// - the number of signers,
// - the percentage of in-turn blocks
func (api *API) Status() (*status, error) {
func (api *API) Status() (*Status, error) {
var (
numBlocks = uint64(64)
header = api.chain.CurrentHeader()
Expand Down Expand Up @@ -169,7 +169,7 @@ func (api *API) Status() (*status, error) {
}
signStatus[sealer]++
}
return &status{
return &Status{
InturnPercent: float64((100 * optimals)) / float64(numBlocks),
SigningStatus: signStatus,
NumBlocks: numBlocks,
Expand Down