mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
update ironwood dependency, fix api
This commit is contained in:
parent
8d09e68e80
commit
b11cf7a2f2
4 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue