From bd2204074c611f1e7c895e4498fcdd82b6f82227 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 19 Nov 2019 18:52:06 +0100 Subject: [PATCH] consensus/clique: re-export the status struct --- consensus/clique/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consensus/clique/api.go b/consensus/clique/api.go index 4739a403afb7..4daf2aee6512 100644 --- a/consensus/clique/api.go +++ b/consensus/clique/api.go @@ -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"` @@ -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() @@ -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,