From b11cf7a2f29dc75aad8c98dc2a1a4e44f92a6922 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Tue, 18 May 2021 20:43:38 -0500 Subject: [PATCH] update ironwood dependency, fix api --- go.mod | 2 +- go.sum | 4 ++-- src/admin/getdht.go | 4 ++-- src/yggdrasil/api.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 9c35842f..600026ba 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/yggdrasil-network/yggdrasil-go go 1.16 require ( - github.com/Arceliar/ironwood v0.0.0-20210516202558-11160a0940e1 + github.com/Arceliar/ironwood v0.0.0-20210519013150-a5401869b037 github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979 github.com/cheggaaa/pb/v3 v3.0.6 github.com/fatih/color v1.10.0 // indirect diff --git a/go.sum b/go.sum index e9fe5248..5e39b487 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Arceliar/ironwood v0.0.0-20210516202558-11160a0940e1 h1:EVa/kL+8lgZmnAit/a0DIacKNZ/lj7NwjmO4B++t4PU= -github.com/Arceliar/ironwood v0.0.0-20210516202558-11160a0940e1/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk= +github.com/Arceliar/ironwood v0.0.0-20210519013150-a5401869b037 h1:SQ7opLc8dCNAgyYIeVZUGwvZ5YrfqRLHMwOGWfH/S/k= +github.com/Arceliar/ironwood v0.0.0-20210519013150-a5401869b037/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk= github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979 h1:WndgpSW13S32VLQ3ugUxx2EnnWmgba1kCqPkd4Gk1yQ= github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979/go.mod h1:6Lkn+/zJilRMsKmbmG1RPoamiArC6HS73xbwRyp3UyI= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= diff --git a/src/admin/getdht.go b/src/admin/getdht.go index 2796e4ff..5dc95547 100644 --- a/src/admin/getdht.go +++ b/src/admin/getdht.go @@ -16,7 +16,7 @@ type GetDHTResponse struct { type DHTEntry struct { PublicKey string `json:"key"` Port uint64 `json:"port"` - Next uint64 `json:"next"` + Rest uint64 `json:"rest"` } func (a *AdminSocket) getDHTHandler(req *GetDHTRequest, res *GetDHTResponse) error { @@ -27,7 +27,7 @@ func (a *AdminSocket) getDHTHandler(req *GetDHTRequest, res *GetDHTResponse) err res.DHT[so] = DHTEntry{ PublicKey: hex.EncodeToString(d.Key[:]), Port: d.Port, - Next: d.Next, + Rest: d.Rest, } } return nil diff --git a/src/yggdrasil/api.go b/src/yggdrasil/api.go index a2c0d541..1740e47b 100644 --- a/src/yggdrasil/api.go +++ b/src/yggdrasil/api.go @@ -31,7 +31,7 @@ type Peer struct { type DHTEntry struct { Key ed25519.PublicKey Port uint64 - Next uint64 + Rest uint64 } type PathEntry struct { @@ -73,7 +73,7 @@ func (c *Core) GetDHT() []DHTEntry { var info DHTEntry info.Key = d.Key info.Port = d.Port - info.Next = d.Next + info.Rest = d.Rest dhts = append(dhts, info) } return dhts