OSDN Git Service

try to fix ban peer bug (#273)
[bytom/vapor.git] / federation / config / config.go
index 270f9b8..52568dc 100644 (file)
@@ -33,16 +33,16 @@ func NewConfigWithPath(path string) *Config {
 }
 
 type Config struct {
-       GinGonic    GinGonic    `json:"gin-gonic"`
+       API         API         `json:"api"`
        MySQLConfig MySQLConfig `json:"mysql"`
        Warders     []Warder    `json:"warders"`
+       Quorum      int         `json:"quorum"`
        Mainchain   Chain       `json:"mainchain"`
        Sidechain   Chain       `json:"sidechain"`
 }
 
-type GinGonic struct {
-       ListeningPort uint64 `json:"listening_port"`
-       IsReleaseMode bool   `json:"is_release_mode"`
+type API struct {
+       IsReleaseMode bool `json:"is_release_mode"`
 }
 
 type MySQLConfig struct {
@@ -61,13 +61,11 @@ type MySQLConnection struct {
 type Warder struct {
        Position uint8        `json:"position"`
        XPub     chainkd.XPub `json:"xpub"`
-       HostPort string       `json:"host_port"`
-       IsLocal  bool         `json:"is_local"`
 }
 
 type Chain struct {
        Name          string `json:"name"`
        Upstream      string `json:"upstream"`
        SyncSeconds   uint64 `json:"sync_seconds"`
-       Confirmations string `json:"confirmations"`
+       Confirmations uint64 `json:"confirmations"`
 }