From 1836366ac19e30f157570e61342fae53bc6c8a57 Mon Sep 17 00:00:00 2001 From: Elad Date: Thu, 14 Jun 2018 11:21:17 +0200 Subject: all: library changes for swarm-network-rewrite (#16898) This commit adds all changes needed for the merge of swarm-network-rewrite. The changes: - build: increase linter timeout - contracts/ens: export ensNode - log: add Output method and enable fractional seconds in format - metrics: relax test timeout - p2p: reduced some log levels, updates to simulation packages - rpc: increased maxClientSubscriptionBuffer to 20000 --- p2p/simulations/network.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'p2p/simulations/network.go') diff --git a/p2p/simulations/network.go b/p2p/simulations/network.go index 1a2c1e8ff..a8a46cd87 100644 --- a/p2p/simulations/network.go +++ b/p2p/simulations/network.go @@ -382,6 +382,15 @@ func (net *Network) GetNodeByName(name string) *Node { return net.getNodeByName(name) } +// GetNodes returns the existing nodes +func (net *Network) GetNodes() (nodes []*Node) { + net.lock.Lock() + defer net.lock.Unlock() + + nodes = append(nodes, net.Nodes...) + return nodes +} + func (net *Network) getNode(id discover.NodeID) *Node { i, found := net.nodeMap[id] if !found { @@ -399,15 +408,6 @@ func (net *Network) getNodeByName(name string) *Node { return nil } -// GetNodes returns the existing nodes -func (net *Network) GetNodes() (nodes []*Node) { - net.lock.Lock() - defer net.lock.Unlock() - - nodes = append(nodes, net.Nodes...) - return nodes -} - // GetConn returns the connection which exists between "one" and "other" // regardless of which node initiated the connection func (net *Network) GetConn(oneID, otherID discover.NodeID) *Conn { -- cgit v1.2.3