Merge pull request #4786
c22e85fe
simplewallet: remove redundant messages on daemon connection failure (stoffu)
This commit is contained in:
commit
279a0a4d8a
|
@ -781,10 +781,7 @@ bool simple_wallet::payment_id(const std::vector<std::string> &args/* = std::vec
|
||||||
bool simple_wallet::print_fee_info(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
|
bool simple_wallet::print_fee_info(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
|
||||||
{
|
{
|
||||||
if (!try_connect_to_daemon())
|
if (!try_connect_to_daemon())
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("Cannot connect to daemon");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
const bool per_byte = m_wallet->use_fork_rules(HF_VERSION_PER_BYTE_FEE);
|
const bool per_byte = m_wallet->use_fork_rules(HF_VERSION_PER_BYTE_FEE);
|
||||||
const uint64_t base_fee = m_wallet->get_base_fee();
|
const uint64_t base_fee = m_wallet->get_base_fee();
|
||||||
const char *base = per_byte ? "byte" : "kB";
|
const char *base = per_byte ? "byte" : "kB";
|
||||||
|
@ -4671,10 +4668,7 @@ bool simple_wallet::print_ring_members(const std::vector<tools::wallet2::pending
|
||||||
{
|
{
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
if (!try_connect_to_daemon(false, &version))
|
if (!try_connect_to_daemon(false, &version))
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("failed to connect to the daemon");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
// available for RPC version 1.4 or higher
|
// available for RPC version 1.4 or higher
|
||||||
if (version < MAKE_CORE_RPC_VERSION(1, 4))
|
if (version < MAKE_CORE_RPC_VERSION(1, 4))
|
||||||
return true;
|
return true;
|
||||||
|
@ -6563,10 +6557,7 @@ bool simple_wallet::get_spend_proof(const std::vector<std::string> &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!try_connect_to_daemon())
|
if (!try_connect_to_daemon())
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("failed to connect to the daemon");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
SCOPED_WALLET_UNLOCK();
|
SCOPED_WALLET_UNLOCK();
|
||||||
|
|
||||||
|
@ -6601,10 +6592,7 @@ bool simple_wallet::check_spend_proof(const std::vector<std::string> &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!try_connect_to_daemon())
|
if (!try_connect_to_daemon())
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("failed to connect to the daemon");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
std::string sig_str;
|
std::string sig_str;
|
||||||
if (!epee::file_io_utils::load_file_to_string(args[1], sig_str))
|
if (!epee::file_io_utils::load_file_to_string(args[1], sig_str))
|
||||||
|
@ -6658,10 +6646,7 @@ bool simple_wallet::get_reserve_proof(const std::vector<std::string> &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!try_connect_to_daemon())
|
if (!try_connect_to_daemon())
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("failed to connect to the daemon");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
SCOPED_WALLET_UNLOCK();
|
SCOPED_WALLET_UNLOCK();
|
||||||
|
|
||||||
|
@ -6689,10 +6674,7 @@ bool simple_wallet::check_reserve_proof(const std::vector<std::string> &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!try_connect_to_daemon())
|
if (!try_connect_to_daemon())
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("failed to connect to the daemon");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
cryptonote::address_parse_info info;
|
cryptonote::address_parse_info info;
|
||||||
if(!cryptonote::get_account_address_from_str_or_url(info, m_wallet->nettype(), args[0], oa_prompter))
|
if(!cryptonote::get_account_address_from_str_or_url(info, m_wallet->nettype(), args[0], oa_prompter))
|
||||||
|
|
Loading…
Reference in New Issue