diff options
| author | Riccardo Spagni <ric@spagni.net> | 2018-11-20 12:34:25 +0900 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2018-11-20 12:34:25 +0900 |
| commit | 6c223fa96fb46ecb815b86cc3065aeed42205b76 (patch) | |
| tree | a0d963aa0411b9d0f7c2738d81b90d06b09e49d4 /src/rpc/rpc_handler.cpp | |
| parent | d850e05b53b0e6a796f157e33d338b3b8c83ce05 (diff) | |
| parent | 31d80027b5cc59b48205334a9e361c6a75099592 (diff) | |
| download | monzero-core-6c223fa96fb46ecb815b86cc3065aeed42205b76.tar.gz monzero-core-6c223fa96fb46ecb815b86cc3065aeed42205b76.tar.xz monzero-core-6c223fa96fb46ecb815b86cc3065aeed42205b76.zip | |
Merge pull request #4812
31d80027 tests: add unit tests for get_output_distribution (moneromooo-monero)
0936dae8 blockchain: remove "0 is height" shortcut from get_output_distribution (moneromooo-monero)
872c7eb2 Revert "blockchain: simplify output distribution code" (moneromooo-monero)
Diffstat (limited to 'src/rpc/rpc_handler.cpp')
| -rw-r--r-- | src/rpc/rpc_handler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/rpc_handler.cpp b/src/rpc/rpc_handler.cpp index d4beb1928..63664bf8b 100644 --- a/src/rpc/rpc_handler.cpp +++ b/src/rpc/rpc_handler.cpp @@ -26,7 +26,7 @@ namespace rpc } boost::optional<output_distribution_data> - RpcHandler::get_output_distribution(core& src, std::uint64_t amount, std::uint64_t from_height, std::uint64_t to_height, bool cumulative) + RpcHandler::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) { static struct D { @@ -43,7 +43,7 @@ namespace rpc std::vector<std::uint64_t> distribution; std::uint64_t start_height, base; - if (!src.get_output_distribution(amount, from_height, to_height, start_height, distribution, base)) + if (!f(amount, from_height, to_height, start_height, distribution, base)) return boost::none; if (to_height > 0 && to_height >= from_height) |
