mirror of
https://github.com/monero-project/monero.git
synced 2024-12-26 13:09:26 -05:00
Merge pull request #5491
98fb98f9
wallet_rpc_server: adding missing return on error in set_daemon (moneromooo-monero)9074c0d8
wallet_rpc_server: return false on error in set_log_categories (moneromooo-monero)968848a7
wallet_rpc_server: fix crash in validate_address if no wallet is loaded (moneromooo-monero)
This commit is contained in:
commit
52eb454d7b
@ -4069,9 +4069,10 @@ namespace tools
|
||||
{ cryptonote::TESTNET, "testnet" },
|
||||
{ cryptonote::STAGENET, "stagenet" },
|
||||
};
|
||||
if (!req.any_net_type && !m_wallet) return not_open(er);
|
||||
for (const auto &net_type: net_types)
|
||||
{
|
||||
if (!req.any_net_type && net_type.type != m_wallet->nettype())
|
||||
if (!req.any_net_type && (!m_wallet || net_type.type != m_wallet->nettype()))
|
||||
continue;
|
||||
if (req.allow_openalias)
|
||||
{
|
||||
@ -4153,6 +4154,7 @@ namespace tools
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_NO_DAEMON_CONNECTION;
|
||||
er.message = "SSL is enabled but no user certificate or fingerprints were provided";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_wallet->set_daemon(req.address, boost::none, req.trusted, std::move(ssl_options)))
|
||||
@ -4177,7 +4179,7 @@ namespace tools
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_INVALID_LOG_LEVEL;
|
||||
er.message = "Error: log level not valid";
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
mlog_set_log_level(req.level);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user