diff --git a/libraries/plugins/peerplays_sidechain/peerplays_sidechain_plugin.cpp b/libraries/plugins/peerplays_sidechain/peerplays_sidechain_plugin.cpp index ec4375d1..f6630586 100644 --- a/libraries/plugins/peerplays_sidechain/peerplays_sidechain_plugin.cpp +++ b/libraries/plugins/peerplays_sidechain/peerplays_sidechain_plugin.cpp @@ -111,23 +111,31 @@ void peerplays_sidechain_plugin_impl::plugin_set_program_options( string son_id_example2 = fc::json::to_string(chain::son_id_type(6)); cli.add_options() - ("son-id", bpo::value>(), ("ID of SON controlled by this node (e.g. " + son_id_example + ", quotes are required)").c_str()) - ("son-ids", bpo::value(), ("IDs of multiple SONs controlled by this node (e.g. [" + son_id_example + ", " + son_id_example2 + "], quotes are required)").c_str()) + ("son-id", bpo::value>(), ("ID of SON controlled by this node (e.g. " + son_id_example + ", quotes are required)").c_str()); + cli.add_options() + ("son-ids", bpo::value(), ("IDs of multiple SONs controlled by this node (e.g. [" + son_id_example + ", " + son_id_example2 + "], quotes are required)").c_str()); + cli.add_options() ("peerplays-private-key", bpo::value>()->composing()->multitoken()-> DEFAULT_VALUE_VECTOR(std::make_pair(chain::public_key_type(default_priv_key.get_public_key()), graphene::utilities::key_to_wif(default_priv_key))), - "Tuple of [PublicKey, WIF private key] (may specify multiple times)") - - ("bitcoin-node-ip", bpo::value()->default_value("99.79.189.95"), "IP address of Bitcoin node") - ("bitcoin-node-zmq-port", bpo::value()->default_value(11111), "ZMQ port of Bitcoin node") - ("bitcoin-node-rpc-port", bpo::value()->default_value(22222), "RPC port of Bitcoin node") - ("bitcoin-node-rpc-user", bpo::value()->default_value("1"), "Bitcoin RPC user") - ("bitcoin-node-rpc-password", bpo::value()->default_value("1"), "Bitcoin RPC password") - ("bitcoin-wallet", bpo::value(), "Bitcoin wallet") - ("bitcoin-wallet-password", bpo::value(), "Bitcoin wallet password") + "Tuple of [PublicKey, WIF private key] (may specify multiple times)"); + cli.add_options() + ("bitcoin-node-ip", bpo::value()->default_value("99.79.189.95"), "IP address of Bitcoin node"); + cli.add_options() + ("bitcoin-node-zmq-port", bpo::value()->default_value(11111), "ZMQ port of Bitcoin node"); + cli.add_options() + ("bitcoin-node-rpc-port", bpo::value()->default_value(22222), "RPC port of Bitcoin node"); + cli.add_options() + ("bitcoin-node-rpc-user", bpo::value()->default_value("1"), "Bitcoin RPC user"); + cli.add_options() + ("bitcoin-node-rpc-password", bpo::value()->default_value("1"), "Bitcoin RPC password"); + cli.add_options() + ("bitcoin-wallet", bpo::value(), "Bitcoin wallet"); + cli.add_options() + ("bitcoin-wallet-password", bpo::value(), "Bitcoin wallet password"); + cli.add_options() ("bitcoin-private-key", bpo::value>()->composing()->multitoken()-> DEFAULT_VALUE_VECTOR(std::make_pair("02d0f137e717fb3aab7aff99904001d49a0a636c5e1342f8927a4ba2eaee8e9772", "cVN31uC9sTEr392DLVUEjrtMgLA8Yb3fpYmTRj7bomTm6nn2ANPr")), - "Tuple of [Bitcoin public key, Bitcoin private key] (may specify multiple times)") - ; + "Tuple of [Bitcoin public key, Bitcoin private key] (may specify multiple times)"); cfg.add(cli); } diff --git a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp index 60e2356e..67e72db4 100644 --- a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp +++ b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp @@ -386,8 +386,14 @@ sidechain_net_handler_bitcoin::sidechain_net_handler_bitcoin(peerplays_sidechain rpc_port = options.at("bitcoin-node-rpc-port").as(); rpc_user = options.at("bitcoin-node-rpc-user").as(); rpc_password = options.at("bitcoin-node-rpc-password").as(); - wallet = options.at("bitcoin-wallet").as(); - wallet_password = options.at("bitcoin-wallet-password").as(); + wallet = ""; + if (options.count("bitcoin-wallet")) { + wallet = options.at("bitcoin-wallet").as(); + } + wallet_password = ""; + if (options.count("bitcoin-wallet-password")) { + wallet_password = options.at("bitcoin-wallet-password").as(); + } if( options.count("bitcoin-private-key") ) {