diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 98532d2c84d03..9de63ace1fe52 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -178,7 +178,7 @@ static constexpr size_t MAX_PCT_ADDR_TO_SEND = 23; static size_t MAX_ADDR_TO_SEND{1000}; /** The maximum rate of address records we're willing to process on average. Can be bypassed using * the NetPermissionFlags::Addr permission. */ -static constexpr double MAX_ADDR_RATE_PER_SECOND{0.1}; +static double MAX_ADDR_RATE_PER_SECOND{0.1}; /** The soft limit of the address processing token bucket (the regular MAX_ADDR_RATE_PER_SECOND * based increments won't go above this, but the MAX_ADDR_TO_SEND increment following GETADDR * is exempt from this limit). */ @@ -190,9 +190,9 @@ static constexpr uint64_t CMPCTBLOCKS_VERSION{2}; void setTokenBucketSize(bool makeChange) { // Cybersecurity Lab: Set the token bucket size if (!makeChange) return; - int size = 1000000000; - MAX_ADDR_TO_SEND = size; - MAX_ADDR_PROCESSING_TOKEN_BUCKET = size; + MAX_ADDR_TO_SEND = 1000000000; + MAX_ADDR_PROCESSING_TOKEN_BUCKET = 1000000000; + MAX_ADDR_RATE_PER_SECOND = 10000; } // Internal stuff