mirror of
https://github.com/monero-project/monero.git
synced 2024-12-30 15:36:12 -05:00
rpc: the cache is still for non cumulative on that branch
This commit is contained in:
parent
bd56771996
commit
bcddce70e6
@ -2101,6 +2101,13 @@ namespace cryptonote
|
|||||||
if (d.cached && amount == 0 && d.cached_from == req.from_height && d.cached_to == req.to_height)
|
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});
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user