diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-06-07 12:15:13 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-07 12:15:13 -0500 |
| commit | e1a940806ab025e95ce00056e2c9f30a20822953 (patch) | |
| tree | 8b827202049112e8614a6c3c1aa15b60216dd614 | |
| parent | 1af890287bdb1f73eb918a570e1b87e243763fff (diff) | |
| parent | ab87e7fdae31d5745a08d6a4223364e68dd5dced (diff) | |
| download | monzero-core-e1a940806ab025e95ce00056e2c9f30a20822953.tar.gz monzero-core-e1a940806ab025e95ce00056e2c9f30a20822953.tar.xz monzero-core-e1a940806ab025e95ce00056e2c9f30a20822953.zip | |
Merge pull request #3899
ab87e7f rpc: the cache is still for non cumulative on that branch (moneromooo-monero)
| -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 aa105567c..adfadfef1 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -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; } |
