mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-04 20:37:46 +00:00
Link costing based on average RTT (#1171)
This PR updates Ironwood to include the new RTT-based link costing and updates `yggdrasilctl` to report the cost in `getPeers`. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
@ -30,6 +30,7 @@ type PeerInfo struct {
|
||||
Coords []uint64
|
||||
Port uint64
|
||||
Priority uint8
|
||||
Cost uint64
|
||||
RXBytes uint64
|
||||
TXBytes uint64
|
||||
Uptime time.Duration
|
||||
@ -94,6 +95,7 @@ func (c *Core) GetPeers() []PeerInfo {
|
||||
peerinfo.Port = p.Port
|
||||
peerinfo.Priority = p.Priority
|
||||
peerinfo.Latency = p.Latency
|
||||
peerinfo.Cost = p.Cost
|
||||
}
|
||||
peers = append(peers, peerinfo)
|
||||
}
|
||||
|
Reference in New Issue
Block a user