mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Put api DBs into struct
This commit is contained in:
15
api/state.go
15
api/state.go
@@ -1,16 +1,11 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/hermeznetwork/hermez-node/common"
|
||||
"github.com/hermeznetwork/hermez-node/db/historydb"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Status define status of the network
|
||||
type Status struct {
|
||||
Network historydb.Network `json:"network"`
|
||||
Metrics historydb.Metrics `json:"metrics"`
|
||||
Rollup common.RollupVariables `json:"rollup"`
|
||||
Auction common.AuctionVariables `json:"auction"`
|
||||
WithdrawalDelayer common.WDelayerVariables `json:"withdrawalDelayer"`
|
||||
RecommendedFee common.RecommendedFee `json:"recommendedFee"`
|
||||
func (a *API) getState(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, a.status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user