forked from lthn/blockchain
and another tweak of decoy selection algo(more clear exit from loop)
This commit is contained in:
parent
0a702f6897
commit
81bacaf6bb
1 changed files with 1 additions and 1 deletions
|
|
@ -2700,7 +2700,7 @@ bool blockchain_storage::get_target_outs_for_amount_prezarcanum(const COMMAND_RP
|
|||
std::set<size_t> used;
|
||||
used.insert(details.own_global_index);
|
||||
size_t try_count = 0;
|
||||
for (uint64_t j = 0; j != decoys_count && try_count++ < decoys_count+1;)
|
||||
for (uint64_t j = 0; j != decoys_count || used.size() >= up_index_limit;)
|
||||
{
|
||||
size_t g_index_initial = crypto::rand<size_t>() % up_index_limit;
|
||||
size_t g_index = g_index_initial;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue