From ef4325fd41eb42a46be2d3d1cd5d836a37abcbf9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 12 Sep 2020 13:34:49 +0000 Subject: wallet2: fix tx sanity check triggering on pre-rct outputs --- src/wallet/wallet2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 3e2ccd1ff..954d6bab1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -8052,13 +8052,16 @@ std::pair, size_t> outs_unique(const std::vector> &outs, const std::vector &selected_transfers, size_t fake_outputs_count) +void wallet2::get_outs(std::vector> &outs, const std::vector &selected_transfers, size_t fake_outputs_count, bool rct) { std::vector rct_offsets; for (size_t attempts = 3; attempts > 0; --attempts) { get_outs(outs, selected_transfers, fake_outputs_count, rct_offsets); + if (!rct) + return; + const auto unique = outs_unique(outs); if (tx_sanity_check(unique.first, unique.second, rct_offsets.empty() ? 0 : rct_offsets.back())) { @@ -8696,7 +8699,7 @@ void wallet2::transfer_selected(const std::vector