mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 07:49:27 -05: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
c534fe8d19
commit
b665bab1d6
@ -2097,6 +2097,13 @@ namespace cryptonote
|
|||||||
{
|
{
|
||||||
res.distributions.push_back({amount, slot.start_height, slot.distribution, slot.base});
|
res.distributions.push_back({amount, slot.start_height, slot.distribution, slot.base});
|
||||||
found = true;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user