ipld-eth-server/pkg/core/node_info.go

42 lines
539 B
Go
Raw Normal View History

package core
import (
"fmt"
)
type NodeType int
const (
GETH NodeType = iota
PARITY
INFURA
2018-08-07 15:51:34 +00:00
GANACHE
)
const (
KOVAN_NETWORK_ID = 42
)
type Node struct {
GenesisBlock string
NetworkID float64
ID string
2018-01-10 21:54:36 +00:00
ClientName string
}
type ParityNodeInfo struct {
Track string
ParityVersion `json:"version"`
Hash string
}
func (pn ParityNodeInfo) String() string {
return fmt.Sprintf("Parity/v%d.%d.%d/", pn.Major, pn.Minor, pn.Patch)
}
type ParityVersion struct {
Major int
Minor int
Patch int
}