p2p/simulation: move connection methods from swarm/network/simulation (#18323)

This commit is contained in:
Elad
2018-12-17 16:49:01 +05:30
committed by Anton Evangelatov
parent d322c9d550
commit 472c23a801
14 changed files with 500 additions and 439 deletions

View File

@ -39,7 +39,7 @@ func (s *Simulation) Service(name string, id enode.ID) node.Service {
// RandomService returns a single Service by name on a
// randomly chosen node that is up.
func (s *Simulation) RandomService(name string) node.Service {
n := s.RandomUpNode()
n := s.Net.GetRandomUpNode().Node.(*adapters.SimNode)
if n == nil {
return nil
}