aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-27 12:44:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-27 12:45:13 +0000
commit0fc927dfbac4c44a021fffa97f7f0848a7514ddf (patch)
tree5103ef77c9bf5dacf541fc045a95c62461c46209
parentMerge pull request #7198 (diff)
downloadmonero-0fc927dfbac4c44a021fffa97f7f0848a7514ddf.tar.xz
portable_storage: remove overly aggressive cutoff
-rw-r--r--contrib/epee/include/storages/portable_storage_from_bin.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/contrib/epee/include/storages/portable_storage_from_bin.h b/contrib/epee/include/storages/portable_storage_from_bin.h
index 20c2bc124..f92546823 100644
--- a/contrib/epee/include/storages/portable_storage_from_bin.h
+++ b/contrib/epee/include/storages/portable_storage_from_bin.h
@@ -168,8 +168,6 @@ namespace epee
CHECK_AND_ASSERT_THROW_MES(size < EPEE_PORTABLE_STORAGE_ARRAY_ELEMENT_LIMIT_INTERNAL - m_array_elements, "Too many array elements");
m_array_elements += size;
CHECK_AND_ASSERT_THROW_MES(size <= m_count / ps_min_bytes<type_name>::strict, "Size sanity check failed");
- const size_t threshold = 16384 - std::min<size_t>(m_array_elements, 16384);
- CHECK_AND_ASSERT_THROW_MES(size <= threshold || size <= m_count / ps_min_bytes<type_name>::rough, "Large array stricter size sanity check failed");
sa.reserve(size);
//TODO: add some optimization here later