042f1142c0
- Fetching headers from Kovan requires custom type without mixHash/Nonce
42 lines
539 B
Go
42 lines
539 B
Go
package core
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type NodeType int
|
|
|
|
const (
|
|
GETH NodeType = iota
|
|
PARITY
|
|
INFURA
|
|
GANACHE
|
|
)
|
|
|
|
const (
|
|
KOVAN_NETWORK_ID = 42
|
|
)
|
|
|
|
type Node struct {
|
|
GenesisBlock string
|
|
NetworkID float64
|
|
ID string
|
|
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
|
|
}
|