diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-04-22 11:21:30 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-04-22 11:22:39 +0100 |
commit | a6d5bb75fe90b9f8d25ded862c7fc2d57b633ee9 (patch) | |
tree | dc7de8be65f2ad9aed0f11afb497a9771edd153f /src/wallet/wallet2.cpp | |
parent | wallet2: bias fake outs more towards recent outputs (diff) | |
download | monero-a6d5bb75fe90b9f8d25ded862c7fc2d57b633ee9.tar.xz |
wallet2: refer to triangular distribution for recent zone in comment
It was wrongly refering to equiprobable distribution, which I think
I'd originally done, but forgot to update the comment after changing
to triangular
Reported by smooth on IRC
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 50efe1cc3..08e186ac5 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3643,7 +3643,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>> uint64_t i; if (num_found - 1 < recent_outputs_count) // -1 to account for the real one we seeded with { - // equiprobable distribution over the recent outs + // triangular distribution over [a,b) with a=0, mode c=b=up_index_limit uint64_t r = crypto::rand<uint64_t>() % ((uint64_t)1 << 53); double frac = std::sqrt((double)r / ((uint64_t)1 << 53)); i = (uint64_t)(frac*num_recent_outs) + num_outs - num_recent_outs; |