diff --git a/CHANGELOG.md b/CHANGELOG.md index e563817..9b12b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Return actuall amount of bytes sent to peers instead of the amount of bytes received + from them. + ## [0.6.2] - 2025-09-19 **IMPORTANT** diff --git a/mycelium/src/peer_manager.rs b/mycelium/src/peer_manager.rs index 1310542..26ab00f 100644 --- a/mycelium/src/peer_manager.rs +++ b/mycelium/src/peer_manager.rs @@ -146,7 +146,7 @@ impl PeerInfo { /// Return the amount of bytes written to this peer. #[inline] fn written(&self) -> u64 { - self.con_traffic.rx_bytes.load(Ordering::Relaxed) + self.con_traffic.tx_bytes.load(Ordering::Relaxed) } }