diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-09-09 10:58:53 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-15 15:54:59 +0200 |
commit | d03308734b1487540af062ab50c94cc7bb3e668e (patch) | |
tree | 59b26c94f7449bb6e57a9c4c7a0ec3983c1d2feb /src/daemon/daemon_commands_handler.h | |
parent | Add testnet seed nodes (diff) | |
download | monero-d03308734b1487540af062ab50c94cc7bb3e668e.tar.xz |
Separate testnet address prefix
Diffstat (limited to 'src/daemon/daemon_commands_handler.h')
-rw-r--r-- | src/daemon/daemon_commands_handler.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/daemon/daemon_commands_handler.h b/src/daemon/daemon_commands_handler.h index 5dc0be7dd..58112e166 100644 --- a/src/daemon/daemon_commands_handler.h +++ b/src/daemon/daemon_commands_handler.h @@ -50,7 +50,12 @@ class daemon_cmmands_handler { nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> >& m_srv; public: - daemon_cmmands_handler(nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> >& srv):m_srv(srv) + daemon_cmmands_handler( + nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> >& srv + , bool testnet + ) + : m_srv(srv) + , m_testnet {testnet} { m_cmd_binder.set_handler("help", boost::bind(&daemon_cmmands_handler::help, this, _1), "Show this help"); m_cmd_binder.set_handler("print_pl", boost::bind(&daemon_cmmands_handler::print_pl, this, _1), "Print peer list"); @@ -84,6 +89,7 @@ public: private: epee::srv_console_handlers_binder<nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> > > m_cmd_binder; + bool m_testnet; //-------------------------------------------------------------------------------- std::string get_commands_str() @@ -368,7 +374,7 @@ private: } cryptonote::account_public_address adr; - if(!cryptonote::get_account_address_from_str(adr, args.front())) + if(!cryptonote::get_account_address_from_str(adr, m_testnet, args.front())) { std::cout << "target account address has wrong format" << std::endl; return true; |