mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: introduce and enforce a maximum storage size
The default storage limit is 64 MB
This commit is contained in:
1 parent
b304418d43
commit
d5dcfa0889
5 files changed
+187
-78
No files matched your search
@@ -80,6 +80,12 @@ findMapValue(const msgpack::object& map, const std::string& key) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t
|
||||
Value::size() const
|
||||
{
|
||||
return cypher.size() + data.size() + signature.size() + user_type.size();
|
||||
}
|
||||
|
||||
void
|
||||
Value::msgpack_unpack(msgpack::object o)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user