mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #7236
ab5e185
protocol: fix wrong command in logs (moneromooo-monero)
This commit is contained in:
commit
1f3f07d0e7
1 changed files with 1 additions and 9 deletions
|
@ -51,14 +51,6 @@
|
||||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||||
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p.tx"
|
#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 cryptonote
|
||||||
{
|
{
|
||||||
namespace levin
|
namespace levin
|
||||||
|
@ -212,7 +204,7 @@ namespace levin
|
||||||
{
|
{
|
||||||
const epee::byte_slice blob = make_tx_payload(std::move(txs), pad, fluff);
|
const epee::byte_slice blob = make_tx_payload(std::move(txs), pad, fluff);
|
||||||
p2p.for_connection(destination, [&blob](detail::p2p_context& context) {
|
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 true;
|
||||||
});
|
});
|
||||||
return p2p.notify(NOTIFY_NEW_TRANSACTIONS::ID, epee::to_span(blob), destination);
|
return p2p.notify(NOTIFY_NEW_TRANSACTIONS::ID, epee::to_span(blob), destination);
|
||||||
|
|
Loading…
Reference in a new issue