mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
p2p: use a bool for send()
Identified by @selsta Callers can otherwise misinterpret int -1 as truthy success, e.g. see make_payload_send_txs (cherry picked from commit 9bf193728bb11beb9c40e06a0d48d1c697fe7a84)
This commit is contained in:
@@ -2445,7 +2445,7 @@ TEST_F(levin_notify, command_max_bytes)
|
||||
bytes = dest.finalize_notify(ping_command);
|
||||
}
|
||||
|
||||
EXPECT_EQ(1, get_connections().send(bytes.clone(), contexts_.front().get_id()));
|
||||
EXPECT_TRUE(get_connections().send(bytes.clone(), contexts_.front().get_id()));
|
||||
EXPECT_EQ(1u, contexts_.front().process_send_queue(true));
|
||||
EXPECT_EQ(1u, receiver_.notified_size());
|
||||
|
||||
@@ -2461,7 +2461,7 @@ TEST_F(levin_notify, command_max_bytes)
|
||||
bytes = dest.finalize_notify(ping_command);
|
||||
}
|
||||
|
||||
EXPECT_EQ(1, get_connections().send(std::move(bytes), contexts_.front().get_id()));
|
||||
EXPECT_TRUE(get_connections().send(std::move(bytes), contexts_.front().get_id()));
|
||||
EXPECT_EQ(1u, contexts_.front().process_send_queue(false));
|
||||
EXPECT_EQ(0u, receiver_.notified_size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user