From 0475c8ba4d10dce79092361bc4c23c11dadba39a Mon Sep 17 00:00:00 2001 From: fanquake Date: Sat, 24 Oct 2020 19:13:42 +0800 Subject: net: use std::chrono throughout maxOutbound logic --- src/net.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 1b9722fc27..51cf6f4579 100644 --- a/src/net.h +++ b/src/net.h @@ -363,7 +363,7 @@ public: ServiceFlags GetLocalServices() const; uint64_t GetMaxOutboundTarget(); - uint64_t GetMaxOutboundTimeframe(); + std::chrono::seconds GetMaxOutboundTimeframe(); //! check if the outbound target is reached //! if param historicalBlockServingLimit is set true, the function will @@ -374,9 +374,9 @@ public: //! in case of no limit, it will always response 0 uint64_t GetOutboundTargetBytesLeft(); - //! response the time in second left in the current max outbound cycle - //! in case of no limit, it will always response 0 - uint64_t GetMaxOutboundTimeLeftInCycle(); + //! returns the time left in the current max outbound cycle + //! in case of no limit, it will always return 0 + std::chrono::seconds GetMaxOutboundTimeLeftInCycle(); uint64_t GetTotalBytesRecv(); uint64_t GetTotalBytesSent(); @@ -475,7 +475,7 @@ private: // outbound limit & stats uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(cs_totalBytesSent) {0}; - uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent) {0}; + std::chrono::seconds nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent) {0}; uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent); // P2P timeout in seconds -- cgit v1.2.3