diff --git a/go.mod b/go.mod index 3c1e2da8..5a685912 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/yggdrasil-network/yggdrasil-go go 1.19 require ( - github.com/Arceliar/ironwood v0.0.0-20230513191034-495699d87ae4 + github.com/Arceliar/ironwood v0.0.0-20230513211242-fac5b9486c3c github.com/Arceliar/phony v0.0.0-20220903101357-530938a4b13d github.com/cheggaaa/pb/v3 v3.0.8 github.com/gologme/log v1.2.0 diff --git a/go.sum b/go.sum index ca7fde5d..66dfae5c 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Arceliar/ironwood v0.0.0-20230513191034-495699d87ae4 h1:I2IlZA7DQAZCR3xasKDJ2YgHbXh1fbyOu0Jqn1i4Zi8= -github.com/Arceliar/ironwood v0.0.0-20230513191034-495699d87ae4/go.mod h1:MIfrhR4b+U6gurd5pln622Zwaf2kzpIvXcnvRZMvlRI= +github.com/Arceliar/ironwood v0.0.0-20230513211242-fac5b9486c3c h1:+MCqerP9VlZw/ECZaDItAgihDDcDGAszgKu/n14WjP0= +github.com/Arceliar/ironwood v0.0.0-20230513211242-fac5b9486c3c/go.mod h1:MIfrhR4b+U6gurd5pln622Zwaf2kzpIvXcnvRZMvlRI= github.com/Arceliar/phony v0.0.0-20220903101357-530938a4b13d h1:UK9fsWbWqwIQkMCz1CP+v5pGbsGoWAw6g4AyvMpm1EM= github.com/Arceliar/phony v0.0.0-20220903101357-530938a4b13d/go.mod h1:BCnxhRf47C/dy/e/D2pmB8NkB3dQVIrkD98b220rx5Q= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= diff --git a/src/admin/admin.go b/src/admin/admin.go index 75089ba5..d0d444be 100644 --- a/src/admin/admin.go +++ b/src/admin/admin.go @@ -145,22 +145,20 @@ func (a *AdminSocket) SetupAdminHandlers() { return res, nil }, ) - /* - _ = a.AddHandler( - "getPaths", "Show established paths through this node", []string{}, - func(in json.RawMessage) (interface{}, error) { - req := &GetPathsRequest{} - res := &GetPathsResponse{} - if err := json.Unmarshal(in, &req); err != nil { - return nil, err - } - if err := a.getPathsHandler(req, res); err != nil { - return nil, err - } - return res, nil - }, - ) - */ + _ = a.AddHandler( + "getPaths", "Show established paths through this node", []string{}, + func(in json.RawMessage) (interface{}, error) { + req := &GetPathsRequest{} + res := &GetPathsResponse{} + if err := json.Unmarshal(in, &req); err != nil { + return nil, err + } + if err := a.getPathsHandler(req, res); err != nil { + return nil, err + } + return res, nil + }, + ) _ = a.AddHandler( "getSessions", "Show established traffic sessions with remote nodes", []string{}, func(in json.RawMessage) (interface{}, error) { diff --git a/src/core/core_test.go b/src/core/core_test.go index f917030b..ce28f4e5 100644 --- a/src/core/core_test.go +++ b/src/core/core_test.go @@ -75,7 +75,8 @@ func WaitConnected(nodeA, nodeB *Core) bool { return true } */ - if len(nodeA.GetDHT()) > 1 && len(nodeB.GetDHT()) > 1 { + if len(nodeA.GetTree()) > 1 && len(nodeB.GetTree()) > 1 { + time.Sleep(3*time.Second) // FIXME hack, there's still stuff happening internally return true } }