diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-01 09:02:45 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-01 09:03:31 +0100 |
commit | bcddce70e66b25615237c70ac273e24f7d263242 (patch) | |
tree | e666ea8cf1f94abf0a6da481b0200ee7e03f791a /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #3858 (diff) | |
download | monero-bcddce70e66b25615237c70ac273e24f7d263242.tar.xz |
rpc: the cache is still for non cumulative on that branch
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index eba261fad..d5d0684b2 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -2101,6 +2101,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; } |