aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-31 16:51:59 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2021-01-03 14:07:58 +0000
commit3c7eec152cd5663c461f64699574943d3619f0b9 (patch)
tree77fbfb324aff4ebee841dafb6b48466e7887852e /tests/unit_tests
parentMerge pull request #7228 from vtnerd/fix/p2p_memory_usage_017 (diff)
downloadmonero-3c7eec152cd5663c461f64699574943d3619f0b9.tar.xz
add a max levin packet size by command type
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/epee_levin_protocol_handler_async.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp
index 55092fd90..f1969ca18 100644
--- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp
+++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp
@@ -45,6 +45,7 @@ namespace
{
static constexpr int handshake_command() noexcept { return 1001; }
static constexpr bool handshake_complete() noexcept { return true; }
+ size_t get_max_bytes(int command) const { return LEVIN_DEFAULT_MAX_PACKET_SIZE; }
};
typedef epee::levin::async_protocol_handler_config<test_levin_connection_context> test_levin_protocol_handler_config;