mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 03:59:33 +00:00
Merge pull request #3899
ab87e7f
rpc: the cache is still for non cumulative on that branch (moneromooo-monero)
This commit is contained in:
commit
e1a940806a
1 changed files with 7 additions and 0 deletions
|
@ -2087,6 +2087,13 @@ namespace cryptonote
|
|||
if (d.cached && amount == 0 && d.cached_from == req.from_height && d.cached_to == req.to_height)
|
||||
{
|
||||
res.distributions.push_back({amount, d.cached_start_height, d.cached_distribution, d.cached_base});
|
||||
if (req.cumulative)
|
||||
{
|
||||
auto &distribution = res.distributions.back().distribution;
|
||||
distribution[0] += d.cached_base;
|
||||
for (size_t n = 1; n < distribution.size(); ++n)
|
||||
distribution[n] += distribution[n-1];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue