MCPcopy Create free account
hub / github.com/ethereum/node-crawler / NodeJSON

Struct NodeJSON

pkg/common/nodes.go:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35type NodeSet map[enode.ID]NodeJSON
36
37type NodeJSON struct {
38 Seq uint64 `json:"seq"`
39 N *enode.Node `json:"record"`
40
41 // The score tracks how many liveness checks were performed. It is incremented by one
42 // every time the node passes a check, and halved every time it doesn't.
43 Score int `json:"score,omitempty"`
44 // These two track the time of last successful contact.
45 FirstResponse time.Time `json:"firstResponse,omitempty"`
46 LastResponse time.Time `json:"lastResponse,omitempty"`
47 // This one tracks the time of our last attempt to contact the node.
48 LastCheck time.Time `json:"lastCheck,omitempty"`
49
50 Info *ClientInfo `json:"clientInfo,omitempty"`
51
52 TooManyPeers bool `json:"tooManyPeers,omitempty"`
53}
54
55func LoadNodesJSON(file string) NodeSet {
56 var nodes NodeSet

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected