diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 6 | ||||
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index aa9fe2bca..b4fbaa86e 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4542,6 +4542,12 @@ bool simple_wallet::export_key_images(const std::vector<std::string> &args) //---------------------------------------------------------------------------------------------------- bool simple_wallet::import_key_images(const std::vector<std::string> &args) { + if (!m_trusted_daemon) + { + fail_msg_writer() << tr("this command requires a trusted daemon. Enable with --trusted-daemon"); + return true; + } + if (args.size() != 1) { fail_msg_writer() << tr("usage: import_key_images <filename>"); diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index da55c2141..77911e9a7 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1364,7 +1364,12 @@ namespace tools er.message = "Command unavailable in restricted mode."; return false; } - + if (!m_trusted_daemon) + { + er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; + er.message = "This command requires a trusted daemon."; + return false; + } try { std::vector<std::pair<crypto::key_image, crypto::signature>> ski; |