From 84578f7820a0467b1825515854e9ae9e46a1a024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 19 May 2016 17:02:40 -0400 Subject: [PATCH] value: reduce size limit to 14KB --- include/opendht/dht.h | 2 +- include/opendht/value.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/opendht/dht.h b/include/opendht/dht.h index 36b52612..8ee291e0 100644 --- a/include/opendht/dht.h +++ b/include/opendht/dht.h @@ -266,7 +266,7 @@ private: static constexpr unsigned LISTEN_NODES {3}; /* The maximum number of values we store for a given hash. */ - static constexpr unsigned MAX_VALUES {2048}; + static constexpr unsigned MAX_VALUES {1024}; /* The maximum number of hashes we're willing to track. */ static constexpr unsigned MAX_HASHES {16384}; diff --git a/include/opendht/value.h b/include/opendht/value.h index fa903a05..23dbd7e4 100644 --- a/include/opendht/value.h +++ b/include/opendht/value.h @@ -80,7 +80,7 @@ using StorePolicy = std::function<bool(InfoHash key, std::shared_ptr<Value>& val */ using EditPolicy = std::function<bool(InfoHash key, const std::shared_ptr<Value>& old_val, std::shared_ptr<Value>& new_val, InfoHash from, const sockaddr* from_addr, socklen_t from_len)>; -static constexpr const size_t MAX_VALUE_SIZE {1024 * 56}; +static constexpr const size_t MAX_VALUE_SIZE {1024 * 14}; struct ValueType { typedef uint16_t Id; -- GitLab