aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-03-27 14:09:53 +0200
committerRiccardo Spagni <ric@spagni.net>2016-03-27 14:09:53 +0200
commit2b57845766ee41fef14166219b9f3aa8ba3f68a2 (patch)
tree82c1d7084d50054a8a8e2d9b418f0e011945fc86 /src/daemon/command_parser_executor.cpp
parentMerge pull request #763 (diff)
parenttests: obligatory hardfork unit build fix after interface change (diff)
downloadmonero-2b57845766ee41fef14166219b9f3aa8ba3f68a2.tar.xz
Merge pull request #765
d5d46e6 tests: obligatory hardfork unit build fix after interface change (moneromooo-monero) 25672d3 wallet: pass std::function by const ref, not value (moneromooo-monero) 0be6e08 wallet: do not leak owned amounts to the daemon unless --trusted-daemon (moneromooo-monero) 12146da wallet: change sweep_dust to sweep_unmixable (moneromooo-monero) 600a3cf New RPC and daemon command to get output histogram (moneromooo-monero) f9a2fd2 wallet: handle rare case where fee adjustment can bump to the next kB (moneromooo-monero) f26651a wallet: factor fee calculation (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 0b42257e7..166fe04ca 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -439,5 +439,23 @@ bool t_command_parser_executor::flush_txpool(const std::vector<std::string>& arg
return m_executor.flush_txpool(txid);
}
+bool t_command_parser_executor::output_histogram(const std::vector<std::string>& args)
+{
+ if (args.size() > 2) return false;
+
+ uint64_t min_count = 3;
+ uint64_t max_count = 0;
+
+ if (args.size() >= 1)
+ {
+ min_count = boost::lexical_cast<uint64_t>(args[0]);
+ }
+ if (args.size() >= 2)
+ {
+ max_count = boost::lexical_cast<uint64_t>(args[1]);
+ }
+ return m_executor.output_histogram(min_count, max_count);
+}
+
} // namespace daemonize