// Private. Create a new node func startNode(nd *node.Node, ready chan struct{}, shutDown <-chan struct{}) { laddr := tmConfig.GetString("node_laddr") if laddr != "" { l := p2p.NewDefaultListener("tcp", laddr, false) nd.AddListener(l) } nd.Start() // If seedNode is provided by config, dial out. if len(tmConfig.GetString("seeds")) > 0 { nd.DialSeed() } ready <- struct{}{} // Block until everything is shut down. <-shutDown nd.Stop() }