mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #229 from hermeznetwork/feature/api-getstate
Add struct get state endpoint
This commit is contained in:
@@ -154,3 +154,21 @@ type BatchAPI struct {
|
||||
FirstItem int `json:"-" meddler:"first_item"`
|
||||
LastItem int `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 []HistoryCoordinator `json:"nextForgers"`
|
||||
}
|
||||
|
||||
// Metrics define metrics of the network
|
||||
type Metrics struct {
|
||||
TransactionsPerBatch float64 `json:"transactionsPerBatch"`
|
||||
BatchFrequency float64 `json:"batchFrequency"`
|
||||
TransactionsPerSecond float64 `json:"transactionsPerSecond"`
|
||||
TotalAccounts int64 `json:"totalAccounts"`
|
||||
TotalBJJs int64 `json:"totalBJJs"`
|
||||
AvgTransactionFee float64 `json:"avgTransactionFee"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user