aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-01-15 23:49:34 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-01-15 23:49:34 -0500
commit1f3f07d0e7a946ad9bb93bbcb52c50493c3bcd25 (patch)
treeb25e58f7bea99fecb4a33fbd7e21dbf6efd41bbc /src/cryptonote_protocol
parentMerge pull request #7204 (diff)
parentprotocol: fix wrong command in logs (diff)
downloadmonero-1f3f07d0e7a946ad9bb93bbcb52c50493c3bcd25.tar.xz
Merge pull request #7236
ab5e185 protocol: fix wrong command in logs (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/levin_notify.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/cryptonote_protocol/levin_notify.cpp b/src/cryptonote_protocol/levin_notify.cpp
index c23a4d2fe..1e9f3e399 100644
--- a/src/cryptonote_protocol/levin_notify.cpp
+++ b/src/cryptonote_protocol/levin_notify.cpp
@@ -51,14 +51,6 @@
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p.tx"
-namespace
-{
- int get_command_from_message(const epee::byte_slice &msg)
- {
- return msg.size() >= sizeof(epee::levin::bucket_head2) ? SWAP32LE(((epee::levin::bucket_head2*)msg.data())->m_command) : 0;
- }
-}
-
namespace cryptonote
{
namespace levin
@@ -212,7 +204,7 @@ namespace levin
{
const epee::byte_slice blob = make_tx_payload(std::move(txs), pad, fluff);
p2p.for_connection(destination, [&blob](detail::p2p_context& context) {
- on_levin_traffic(context, true, true, false, blob.size(), get_command_from_message(blob));
+ on_levin_traffic(context, true, true, false, blob.size(), NOTIFY_NEW_TRANSACTIONS::ID);
return true;
});
return p2p.notify(NOTIFY_NEW_TRANSACTIONS::ID, epee::to_span(blob), destination);