From 69e97b3bbc4e9ef2cf58586d4deddb91a7ddbb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Tue, 5 Nov 2024 16:16:59 +0200 Subject: [PATCH] Remove old use of 1GB constant (#5096) * Remove old use of 1GB constant * Fix clippy --- common/wireguard/src/peer_controller.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/wireguard/src/peer_controller.rs b/common/wireguard/src/peer_controller.rs index 0c77bcf0108..bc143745c4f 100644 --- a/common/wireguard/src/peer_controller.rs +++ b/common/wireguard/src/peer_controller.rs @@ -7,8 +7,8 @@ use defguard_wireguard_rs::{ WireguardInterfaceApi, }; use futures::channel::oneshot; -use nym_authenticator_requests::{ - latest::registration::RemainingBandwidthData, v1::registration::BANDWIDTH_CAP_PER_DAY, +use nym_authenticator_requests::latest::registration::{ + RemainingBandwidthData, BANDWIDTH_CAP_PER_DAY, }; use nym_credential_verification::{ bandwidth_storage_manager::BandwidthStorageManager, BandwidthFlushingBehaviourConfig, @@ -230,7 +230,7 @@ impl PeerController { // host information not updated yet return Ok(None); }; - BANDWIDTH_CAP_PER_DAY.saturating_sub((peer.rx_bytes + peer.tx_bytes) as i64) + BANDWIDTH_CAP_PER_DAY.saturating_sub(peer.rx_bytes + peer.tx_bytes) as i64 }; Ok(Some(RemainingBandwidthData {