mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
rpc: fix get_output_distribution cache for the cumulative case
The distribution was not converted to cumulative after a cache hit
This commit is contained in:
parent
aa6850c71d
commit
15e029ac6d
1 changed files with 7 additions and 0 deletions
|
@ -2112,6 +2112,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…
Reference in a new issue