diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-05-31 14:25:57 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-05-31 14:25:57 -0500 |
commit | 9fde7aafe8491b8c9070dab5f060cbf0d51e3c89 (patch) | |
tree | a54e2e0a842ffaa7bc74a8578d2157081a858701 /src | |
parent | Merge pull request #3525 (diff) | |
parent | rpc: fix get_output_distribution cache for the cumulative case (diff) | |
download | monero-9fde7aafe8491b8c9070dab5f060cbf0d51e3c89.tar.xz |
Merge pull request #3882
b665bab rpc: fix get_output_distribution cache for the cumulative case (moneromooo-monero)
Diffstat (limited to 'src')
-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 b5ef2557a..edda47557 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -2097,6 +2097,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; } } |