Merge pull request #4738

107f3398 wallet2: fix ring reuse breaking when using histogram (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-11-06 21:31:32 +02:00
commit d210d6fb45
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -7215,6 +7215,9 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
break; break;
} }
} }
bool use_histogram = amount != 0 || !has_rct_distribution;
if (!use_histogram)
num_outs = rct_offsets[rct_offsets.size() - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE];
// make sure the real outputs we asked for are really included, along // make sure the real outputs we asked for are really included, along
// with the correct key and mask: this guards against an active attack // with the correct key and mask: this guards against an active attack