router: update interface (#1732)

* router: replace Start and Stop with Close

* router: update default network to micro

* router: update tests
This commit is contained in:
ben-toogood
2020-06-24 11:09:16 +01:00
committed by GitHub
parent 695cc9d526
commit c940961574
8 changed files with 33 additions and 42 deletions

View File

@@ -1746,11 +1746,6 @@ func (n *network) Connect() error {
// create closed channel
n.closed = make(chan bool)
// start the router
if err := n.options.Router.Start(); err != nil {
return err
}
// start advertising routes
advertChan, err := n.options.Router.Advertise()
if err != nil {
@@ -1785,8 +1780,8 @@ func (n *network) close() error {
return err
}
// stop the router
if err := n.router.Stop(); err != nil {
// close the router
if err := n.router.Close(); err != nil {
return err
}