aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2019-11-17 17:54:37 +0000
committerLee Clagett <code@leeclagett.com>2020-05-15 07:57:35 +0000
commit67ade80055984a247d1bc2499a17c937f40883f4 (patch)
treed47215fce15257456d01c8f0d2a260fe7804afdd /src/cryptonote_core/cryptonote_core.cpp
parent378cdeaeaeb1dadc2dd7a324927f1af226611254 (diff)
downloadmonzero-core-67ade80055984a247d1bc2499a17c937f40883f4.tar.gz
monzero-core-67ade80055984a247d1bc2499a17c937f40883f4.tar.xz
monzero-core-67ade80055984a247d1bc2499a17c937f40883f4.zip
Add randomized delay when forwarding txes from i2p/tor -> ipv4/6
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 3ff3c77e2..521734bd2 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1272,6 +1272,7 @@ namespace cryptonote
{
NOTIFY_NEW_TRANSACTIONS::request public_req{};
NOTIFY_NEW_TRANSACTIONS::request private_req{};
+ NOTIFY_NEW_TRANSACTIONS::request stem_req{};
for (auto& tx : txs)
{
switch (std::get<2>(tx))
@@ -1282,6 +1283,9 @@ namespace cryptonote
case relay_method::local:
private_req.txs.push_back(std::move(std::get<1>(tx)));
break;
+ case relay_method::forward:
+ stem_req.txs.push_back(std::move(std::get<1>(tx)));
+ break;
case relay_method::block:
case relay_method::fluff:
case relay_method::stem:
@@ -1299,6 +1303,8 @@ namespace cryptonote
get_protocol()->relay_transactions(public_req, source, epee::net_utils::zone::public_, relay_method::fluff);
if (!private_req.txs.empty())
get_protocol()->relay_transactions(private_req, source, epee::net_utils::zone::invalid, relay_method::local);
+ if (!stem_req.txs.empty())
+ get_protocol()->relay_transactions(stem_req, source, epee::net_utils::zone::public_, relay_method::stem);
}
return true;
}