diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-10-30 09:59:19 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-10-30 09:59:22 +0200 |
commit | 5978fc18f709d183be38ded63c0159768094c0a8 (patch) | |
tree | 9e2ec92c73d2d25d31eb20e6eef2b7b32090040b /src/daemon/command_parser_executor.cpp | |
parent | Merge pull request #461 (diff) | |
parent | rpc: fix start_mining and status RPC crashes (diff) | |
download | monero-5978fc18f709d183be38ded63c0159768094c0a8.tar.xz |
Merge pull request #463
051ddbc rpc: fix start_mining and status RPC crashes (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 51e3231e5..a07bb25de 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -230,6 +230,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg } cryptonote::account_public_address adr; + bool testnet = false; if(!cryptonote::get_account_address_from_str(adr, false, args.front())) { if(!cryptonote::get_account_address_from_str(adr, true, args.front())) @@ -237,6 +238,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg std::cout << "target account address has wrong format" << std::endl; return true; } + testnet = true; std::cout << "Mining to a testnet address, make sure this is intentional!" << std::endl; } uint64_t threads_count = 1; @@ -250,7 +252,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg threads_count = (ok && 0 < threads_count) ? threads_count : 1; } - m_executor.start_mining(adr, threads_count); + m_executor.start_mining(adr, threads_count, testnet); return true; } |