2017-12-07 19:32:16 +00:00
|
|
|
package core
|
|
|
|
|
2018-03-07 21:29:21 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
type NodeType int
|
|
|
|
|
|
|
|
const (
|
|
|
|
GETH NodeType = iota
|
|
|
|
PARITY
|
|
|
|
INFURA
|
2018-08-07 15:51:34 +00:00
|
|
|
GANACHE
|
2018-03-07 21:29:21 +00:00
|
|
|
)
|
|
|
|
|
2017-12-07 19:32:16 +00:00
|
|
|
type Node struct {
|
|
|
|
GenesisBlock string
|
2018-02-13 16:31:57 +00:00
|
|
|
NetworkID float64
|
|
|
|
ID string
|
2018-01-10 21:54:36 +00:00
|
|
|
ClientName string
|
2017-12-07 19:32:16 +00:00
|
|
|
}
|
2018-03-07 21:29:21 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|