From 312d500a36c0ccfc3e53b435efb2b46f11872ac3 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Thu, 28 Mar 2024 19:22:20 +0100 Subject: [PATCH] fixed problem with decoy selection algo --- src/wallet/wallet2.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 5de4c730..bac76141 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6250,6 +6250,12 @@ void wallet2::select_decoys(currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS { out_entry entry = extract_random_from_container(amount_entry.outs); + // + if (entry.global_amount_index == own_g_index) + { + continue; + } + //skip auditable if ((entry.flags & (RANDOM_OUTPUTS_FOR_AMOUNTS_FLAGS_NOT_ALLOWED))) { @@ -6260,11 +6266,7 @@ void wallet2::select_decoys(currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS coinbases.push_back(entry); continue; } - // - if (entry.global_amount_index == own_g_index) - { - continue; - } + local_outs.push_back(entry); }