From bd39dce7e69b9b25477d426437872f9d160cfcfb Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Thu, 14 Apr 2022 21:01:14 +0200 Subject: [PATCH] Fixed #262(-do-pos-mining needs also rpc-bind-port specified to work) --- src/simplewallet/simplewallet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 53b458b0..e32d8515 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2200,6 +2200,13 @@ int main(int argc, char* argv[]) } else // if(command_line::has_arg(vm, tools::wallet_rpc_server::arg_rpc_bind_port)) { + if (command_line::get_arg(vm, arg_do_pos_mining)) + { + // PoS mining can be turned on only in RPC server mode, please provide --rpc-bind-port to make this + fail_msg_writer() << "PoS mining can be turned on only in RPC server mode, please provide --rpc-bind-port=PORT_NO to enable staking in simplewallet"; + return EXIT_FAILURE; + } + //runs wallet with console interface sw->set_offline_mode(offline_mode); r = sw->init(vm);