mirror of
https://github.com/monero-project/monero.git
synced 2025-05-07 22:25:00 -04:00
Remove payload copy in all outgoing p2p messages
This commit is contained in:
parent
0b6bfb1fd8
commit
23aae5571b
20 changed files with 319 additions and 215 deletions
|
@ -153,7 +153,7 @@ TEST(test_epee_connection, test_lifetime)
|
|||
delay(delay),
|
||||
on_connection_close_f(on_connection_close_f)
|
||||
{}
|
||||
virtual int invoke(int, const epee::span<const uint8_t>, epee::byte_slice&, context_t&) override { epee::misc_utils::sleep_no_w(delay); return {}; }
|
||||
virtual int invoke(int, const epee::span<const uint8_t>, epee::byte_stream&, context_t&) override { epee::misc_utils::sleep_no_w(delay); return {}; }
|
||||
virtual int notify(int, const epee::span<const uint8_t>, context_t&) override { return {}; }
|
||||
virtual void callback(context_t&) override {}
|
||||
virtual void on_connection_new(context_t&) override {}
|
||||
|
@ -281,7 +281,7 @@ TEST(test_epee_connection, test_lifetime)
|
|||
for (auto i = 0; i < N; ++i) {
|
||||
tag = create_connection();
|
||||
ASSERT_TRUE(shared_state->get_connections_count() == 1);
|
||||
success = shared_state->invoke_async(1, {}, tag, [](int, const epee::span<const uint8_t>, context_t&){}, TIMEOUT);
|
||||
success = shared_state->invoke_async(1, epee::levin::message_writer{}, tag, [](int, const epee::span<const uint8_t>, context_t&){}, TIMEOUT);
|
||||
ASSERT_TRUE(success);
|
||||
while (shared_state->sock_count == 1) {
|
||||
success = shared_state->foreach_connection([&shared_state, &tag](context_t&){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue