aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-12-12 13:32:35 -0600
committerluigi1111 <luigi1111w@gmail.com>2019-12-12 13:32:35 -0600
commit3531cc5fd2889ec5cdd3aecd0e3ba6672fec2e02 (patch)
treea0abff5ebc21fce520afcdb60a6955b9ffb3c183 /src/p2p/net_node.inl
parentMerge pull request #6174 (diff)
parentAdding support for hidden (anonymity) txpool (diff)
downloadmonero-3531cc5fd2889ec5cdd3aecd0e3ba6672fec2e02.tar.xz
Merge pull request #5965
5d7ae2d Adding support for hidden (anonymity) txpool (vtnerd)
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index f8094bfa8..45bb10593 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -2053,13 +2053,18 @@ namespace nodetool
}
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>
- epee::net_utils::zone node_server<t_payload_net_handler>::send_txs(std::vector<cryptonote::blobdata> txs, const epee::net_utils::zone origin, const boost::uuids::uuid& source, const bool pad_txs)
+ epee::net_utils::zone node_server<t_payload_net_handler>::send_txs(std::vector<cryptonote::blobdata> txs, const epee::net_utils::zone origin, const boost::uuids::uuid& source, cryptonote::i_core_events& core, const bool pad_txs)
{
namespace enet = epee::net_utils;
- const auto send = [&txs, &source, pad_txs] (std::pair<const enet::zone, network_zone>& network)
+ const auto send = [&txs, &source, &core, pad_txs] (std::pair<const enet::zone, network_zone>& network)
{
- if (network.second.m_notifier.send_txs(std::move(txs), source, (pad_txs || network.first != enet::zone::public_)))
+ const bool is_public = (network.first == enet::zone::public_);
+ const cryptonote::relay_method tx_relay = is_public ?
+ cryptonote::relay_method::flood : cryptonote::relay_method::local;
+
+ core.on_transactions_relayed(epee::to_span(txs), tx_relay);
+ if (network.second.m_notifier.send_txs(std::move(txs), source, (pad_txs || !is_public)))
return network.first;
return enet::zone::invalid;
};