mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
API add get state
This commit is contained in:
@@ -1482,3 +1482,9 @@ func (hdb *HistoryDB) GetAccountsAPI(tokenIDs []common.TokenID, ethAddr *ethComm
|
||||
LastItem: accounts[0].LastItem,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GetMetrics returns metrics
|
||||
func (hdb *HistoryDB) GetMetrics() (Metrics, error) {
|
||||
metrics := Metrics{}
|
||||
return metrics, nil
|
||||
}
|
||||
|
||||
@@ -298,14 +298,6 @@ type BatchAPI struct {
|
||||
LastItem uint64 `json:"-" meddler:"last_item"`
|
||||
}
|
||||
|
||||
// Network define status of the network
|
||||
type Network struct {
|
||||
LastBlock int64 `json:"lastBlock"`
|
||||
LastBatch BatchAPI `json:"lastBatch"`
|
||||
CurrentSlot int64 `json:"currentSlot"`
|
||||
NextForgers []CoordinatorAPI `json:"nextForgers"`
|
||||
}
|
||||
|
||||
// Metrics define metrics of the network
|
||||
type Metrics struct {
|
||||
TransactionsPerBatch float64 `json:"transactionsPerBatch"`
|
||||
|
||||
Reference in New Issue
Block a user