Added more node tests. Small refactoring of Netowkr and handler.

This commit is contained in:
Milos Gajdos
2019-09-11 00:23:37 +01:00
parent 16fcf1fbda
commit 2dfbe93d65
7 changed files with 145 additions and 159 deletions

View File

@@ -838,6 +838,16 @@ func (n *network) Connect() error {
return nil
}
// Nodes returns a list of all network nodes
func (n *network) Nodes() []Node {
return n.node.Nodes()
}
// Topology returns network topology
func (n *network) Topology() Node {
return n.node.Topology(MaxDepth)
}
func (n *network) close() error {
// stop the server
if err := n.server.Stop(); err != nil {