Merge pull request #3882

b665bab rpc: fix get_output_distribution cache for the cumulative case (moneromooo-monero)
release-v0.5.1
luigi1111 6 years ago
commit 9fde7aafe8
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -2097,6 +2097,13 @@ namespace cryptonote
{
res.distributions.push_back({amount, slot.start_height, slot.distribution, slot.base});
found = true;
if (req.cumulative)
{
auto &distribution = res.distributions.back().distribution;
distribution[0] += slot.base;
for (size_t n = 1; n < distribution.size(); ++n)
distribution[n] += distribution[n-1];
}
break;
}
}

Loading…
Cancel
Save