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

Method Add

pkg/common/nodes.go:91–98  ·  view source on GitHub ↗

Add ensures the given nodes are present in the set.

(nodes ...*enode.Node)

Source from the content-addressed store, hash-verified

89
90// Add ensures the given nodes are present in the set.
91func (ns NodeSet) Add(nodes ...*enode.Node) {
92 for _, n := range nodes {
93 v := ns[n.ID()]
94 v.N = n
95 v.Seq = n.Seq()
96 ns[n.ID()] = v
97 }
98}
99
100// TopN returns the top n nodes by score as a new set.
101func (ns NodeSet) TopN(n int) NodeSet {

Callers 7

DropOldNodesFunction · 0.80
storeCacheMethod · 0.80
RunMethod · 0.80
CrawlRoundMethod · 0.80
getClientInfoFunction · 0.80
dialFunction · 0.80
startAPIFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected