Skip to content

Commit 2d2aabb

Browse files
committed
fix wg peer upload/download bytes mapping
Signed-off-by: xeptore <29199390+xeptore@users.noreply.github.com>
1 parent 76dd6e9 commit 2d2aabb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ingest/cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ func (wg *wgPeers) Usage(ctx context.Context) ([]ingest.PeerUsage, time.Time, er
195195

196196
out := funcutils.Map(dev.Peers, func(p wgtypes.Peer) ingest.PeerUsage {
197197
return ingest.PeerUsage{
198-
Upload: uint(p.ReceiveBytes), // TODO: make sure this upload/download mappings are correct
199-
Download: uint(p.TransmitBytes),
198+
Upload: uint(p.TransmitBytes),
199+
Download: uint(p.ReceiveBytes),
200200
PublicKey: p.PublicKey.String(),
201201
}
202202
})

0 commit comments

Comments
 (0)