summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/Constants.hpp8
-rw-r--r--node/RateLimiter.hpp9
2 files changed, 13 insertions, 4 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp
index 20ec0a6b..f92540d6 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -284,22 +284,22 @@ error_no_ZT_ARCH_defined;
/**
* Default bytes per second limit for multicasts per peer on a network
*/
-#define ZT_MULTICAST_DEFAULT_BYTES_PER_SECOND 50.0
+#define ZT_MULTICAST_DEFAULT_BYTES_PER_SECOND 100.0
/**
* Default balance preload for multicast rate limiters on a network
*/
-#define ZT_MULTICAST_DEFAULT_RATE_PRELOAD 20000.0
+#define ZT_MULTICAST_DEFAULT_RATE_PRELOAD 25000.0
/**
* Default maximum balance for multicast rate limiters
*/
-#define ZT_MULTICAST_DEFAULT_RATE_MAX_BALANCE 20000.0
+#define ZT_MULTICAST_DEFAULT_RATE_MAX_BALANCE 25000.0
/**
* Default minimum balance for multicast rate limiters (max debt)
*/
-#define ZT_MULTICAST_DEFAULT_RATE_MIN_BALANCE -10000.0
+#define ZT_MULTICAST_DEFAULT_RATE_MIN_BALANCE -5000.0
/**
* Delay between scans of the topology active peer DB for peers that need ping
diff --git a/node/RateLimiter.hpp b/node/RateLimiter.hpp
index 69d47d0a..e5403717 100644
--- a/node/RateLimiter.hpp
+++ b/node/RateLimiter.hpp
@@ -135,6 +135,15 @@ public:
return allow;
}
+ /**
+ * @return Current balance
+ */
+ inline double balance() const
+ throw()
+ {
+ return _balance;
+ }
+
private:
double _lastTime;
double _balance;