From be84f678b925d7c8ae1b8fdd84480b372d528bcd Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Tue, 3 Nov 2020 13:58:14 -0500 Subject: Switch to Dandelion++ fluff mode if no out connections for stem mode --- src/cryptonote_protocol/levin_notify.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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_); } }; -- cgit v1.2.3