Add additional documentation

This commit is contained in:
Luke Parker
2024-07-08 20:33:00 -04:00
parent 5bb3256d1f
commit 84f0e6c26e
5 changed files with 20 additions and 13 deletions

View File

@@ -94,7 +94,8 @@ async fn select_n(
let mut candidates = Vec::with_capacity(remaining);
while candidates.len() != remaining {
// Use a gamma distribution, as Monero does
// TODO: Cite these constants
// https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c45
// /src/wallet/wallet2.cpp#L142-L143
let mut age = Gamma::<f64>::new(19.28, 1.0 / 1.61).unwrap().sample(rng).exp();
#[allow(clippy::cast_precision_loss)]
if age > TIP_APPLICATION {