diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-03-05 19:11:20 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-03-05 19:11:20 +0200 |
commit | 4f93f745284c10f12e2524f5211030085d9626cf (patch) | |
tree | 29b5f359a8f346305bcf7bf82f459f421bfaa7a7 /src/rpc/daemon_handler.cpp | |
parent | Merge pull request #3273 (diff) | |
parent | Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (diff) | |
download | monero-4f93f745284c10f12e2524f5211030085d9626cf.tar.xz |
Merge pull request #3277
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu)
af773211 Stagenet (stoffu)
cc9a0bee command_line: allow args to depend on more than one args (stoffu)
55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu)
450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu)
9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
Diffstat (limited to 'src/rpc/daemon_handler.cpp')
-rw-r--r-- | src/rpc/daemon_handler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index 2f3f336a4..29020aa57 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -413,7 +413,7 @@ namespace rpc void DaemonHandler::handle(const StartMining::Request& req, StartMining::Response& res) { cryptonote::address_parse_info info; - if(!get_account_address_from_str(info, m_core.get_testnet(), req.miner_address)) + if(!get_account_address_from_str(info, m_core.get_nettype(), req.miner_address)) { res.error_details = "Failed, wrong address"; LOG_PRINT_L0(res.error_details); @@ -492,7 +492,9 @@ namespace rpc res.info.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count(); - res.info.testnet = m_core.get_testnet(); + res.info.mainnet = m_core.get_nettype() == MAINNET; + res.info.testnet = m_core.get_nettype() == TESTNET; + res.info.stagenet = m_core.get_nettype() == STAGENET; res.info.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(res.info.height - 1); res.info.block_size_limit = m_core.get_blockchain_storage().get_current_cumulative_blocksize_limit(); res.info.start_time = (uint64_t)m_core.get_start_time(); @@ -525,7 +527,7 @@ namespace rpc res.speed = lMiner.get_speed(); res.threads_count = lMiner.get_threads_count(); const account_public_address& lMiningAdr = lMiner.get_mining_address(); - res.address = get_account_address_as_str(m_core.get_testnet(), false, lMiningAdr); + res.address = get_account_address_as_str(m_core.get_nettype(), false, lMiningAdr); } res.status = Message::STATUS_OK; |