aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2019-11-13 14:12:32 +0000
committerLee Clagett <code@leeclagett.com>2020-03-26 15:01:30 +0000
commit02d887c2e58bd8e66ef8823e59669439d448bfec (patch)
tree0c5ff6825f6555f8930589fa118fe263d29a018b /src/p2p/net_node.inl
parentMerge pull request #6405 (diff)
downloadmonero-02d887c2e58bd8e66ef8823e59669439d448bfec.tar.xz
Adding Dandelion++ support to public networks:
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode - Stem loops detected in tx_pool.cpp - Embargo timeout for a blackhole attack during stem phase
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 09058c76a..4c253b673 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1975,18 +1975,13 @@ 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, cryptonote::i_core_events& core)
+ 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 cryptonote::relay_method tx_relay)
{
namespace enet = epee::net_utils;
- const auto send = [&txs, &source, &core] (std::pair<const enet::zone, network_zone>& network)
+ const auto send = [&txs, &source, &core, tx_relay] (std::pair<const enet::zone, network_zone>& network)
{
- const bool is_public = (network.first == enet::zone::public_);
- const cryptonote::relay_method tx_relay = is_public ?
- cryptonote::relay_method::fluff : 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))
+ if (network.second.m_notifier.send_txs(std::move(txs), source, core, tx_relay))
return network.first;
return enet::zone::invalid;
};