diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-10-11 10:30:52 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-10-11 10:30:53 +0200 |
commit | 3db0ebafe54044fea13d8d5f09948210855fbae6 (patch) | |
tree | bb4a186e6ef10ec4aa836887d4187f4f4f510572 /src/daemon/command_parser_executor.cpp | |
parent | Merge pull request #1205 (diff) | |
parent | print_coinbase_tx_sum now breaks output into fee and emission components (diff) | |
download | monero-3db0ebafe54044fea13d8d5f09948210855fbae6.tar.xz |
Merge pull request #1204
7db29d6 print_coinbase_tx_sum now breaks output into fee and emission components (Dion Ahmetaj)
dd6c443 changed params from start/end index to height/count (Dion Ahmetaj)
e95d3f3 attempted to remove whitespace spam (Dion Ahmetaj)
412da63 added print_coinbase_tx_sum option (Dion Ahmetaj)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 6ea862b56..5d7ed6cc0 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -452,5 +452,27 @@ bool t_command_parser_executor::output_histogram(const std::vector<std::string>& return m_executor.output_histogram(min_count, max_count); } +bool t_command_parser_executor::print_coinbase_tx_sum(const std::vector<std::string>& args) +{ + if(!args.size()) + { + std::cout << "need block height parameter" << std::endl; + return false; + } + uint64_t height = 0; + uint64_t count = 0; + if(!epee::string_tools::get_xtype_from_string(height, args[0])) + { + std::cout << "wrong starter block height parameter" << std::endl; + return false; + } + if(args.size() >1 && !epee::string_tools::get_xtype_from_string(count, args[1])) + { + std::cout << "wrong count parameter" << std::endl; + return false; + } + + return m_executor.print_coinbase_tx_sum(height, count); +} } // namespace daemonize |