diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-25 16:41:33 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-25 16:49:29 +0000 |
commit | 0eb0d6b8022b73cbb76e86a7022705f1e9173837 (patch) | |
tree | ccaf2c87aa0e4a00c4de44a45ad1884e8a283ab7 /src/rpc/rpc_handler.h | |
parent | Merge pull request #5486 (diff) | |
download | monero-0eb0d6b8022b73cbb76e86a7022705f1e9173837.tar.xz |
rpc: improve get_output_distribution
It can now handle small reorgs without having to rescan the
whole blockchain.
Also add a test for it.
Diffstat (limited to 'src/rpc/rpc_handler.h')
-rw-r--r-- | src/rpc/rpc_handler.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/rpc_handler.h b/src/rpc/rpc_handler.h index 2439eaa58..b81983d28 100644 --- a/src/rpc/rpc_handler.h +++ b/src/rpc/rpc_handler.h @@ -32,6 +32,7 @@ #include <cstdint> #include <string> #include <vector> +#include "crypto/hash.h" namespace cryptonote { @@ -56,7 +57,7 @@ class RpcHandler virtual std::string handle(const std::string& request) = 0; static boost::optional<output_distribution_data> - get_output_distribution(const std::function<bool(uint64_t, uint64_t, uint64_t, uint64_t&, std::vector<uint64_t>&, uint64_t&)> &f, uint64_t amount, uint64_t from_height, uint64_t to_height, bool cumulative); + get_output_distribution(const std::function<bool(uint64_t, uint64_t, uint64_t, uint64_t&, std::vector<uint64_t>&, uint64_t&)> &f, uint64_t amount, uint64_t from_height, uint64_t to_height, const std::function<crypto::hash(uint64_t)> &get_hash, bool cumulative, uint64_t blockchain_height); }; |