diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-12-30 21:07:49 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-12-30 21:08:28 +0000 |
commit | ab5e185140e19ae9a156396932b256093d1b9bc6 (patch) | |
tree | 282f6eeb3e9efc8e97e2f43c400277fe5f650e99 | |
parent | Merge pull request #7221 (diff) | |
download | monero-ab5e185140e19ae9a156396932b256093d1b9bc6.tar.xz |
protocol: fix wrong command in logs
this is not a levin packet, this is just its payload
-rw-r--r-- | src/cryptonote_protocol/levin_notify.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/cryptonote_protocol/levin_notify.cpp b/src/cryptonote_protocol/levin_notify.cpp index 21363972d..a8f66a397 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); |