diff options
author | Lee Clagett <code@leeclagett.com> | 2020-11-03 13:58:14 -0500 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-11-03 13:58:14 -0500 |
commit | be84f678b925d7c8ae1b8fdd84480b372d528bcd (patch) | |
tree | 1c53f50ad7e71e94b8c369ec616cab4e033c84c0 /src/cryptonote_protocol | |
parent | Merge pull request #6902 (diff) | |
download | monero-be84f678b925d7c8ae1b8fdd84480b372d528bcd.tar.xz |
Switch to Dandelion++ fluff mode if no out connections for stem mode
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r-- | src/cryptonote_protocol/levin_notify.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cryptonote_protocol/levin_notify.cpp b/src/cryptonote_protocol/levin_notify.cpp index dbd11e7d0..9d349d3df 100644 --- a/src/cryptonote_protocol/levin_notify.cpp +++ b/src/cryptonote_protocol/levin_notify.cpp @@ -524,12 +524,7 @@ namespace levin if (!zone_ || !core_ || txs_.empty()) return; - if (zone_->fluffing) - { - core_->on_transactions_relayed(epee::to_span(txs_), relay_method::fluff); - fluff_notify::run(std::move(zone_), epee::to_span(txs_), source_); - } - else // forward tx in stem + if (!zone_->fluffing) { core_->on_transactions_relayed(epee::to_span(txs_), relay_method::stem); for (int tries = 2; 0 < tries; tries--) @@ -549,6 +544,9 @@ namespace levin MERROR("Unable to send transaction(s) via Dandelion++ stem"); } + + core_->on_transactions_relayed(epee::to_span(txs_), relay_method::fluff); + fluff_notify::run(std::move(zone_), epee::to_span(txs_), source_); } }; |