mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #8404
50ccc7e
wallet2: remove obsolete rpc version check (tobtoht)
This commit is contained in:
commit
cea2498e95
1 changed files with 1 additions and 26 deletions
|
@ -3627,32 +3627,7 @@ bool wallet2::refresh(bool trusted_daemon, uint64_t & blocks_fetched, bool& rece
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
bool wallet2::get_rct_distribution(uint64_t &start_height, std::vector<uint64_t> &distribution)
|
bool wallet2::get_rct_distribution(uint64_t &start_height, std::vector<uint64_t> &distribution)
|
||||||
{
|
{
|
||||||
uint32_t rpc_version;
|
MDEBUG("Requesting rct distribution");
|
||||||
boost::optional<std::string> result = m_node_rpc_proxy.get_rpc_version(rpc_version);
|
|
||||||
// no error
|
|
||||||
if (!!result)
|
|
||||||
{
|
|
||||||
// empty string -> not connection
|
|
||||||
THROW_WALLET_EXCEPTION_IF(result->empty(), tools::error::no_connection_to_daemon, "getversion");
|
|
||||||
THROW_WALLET_EXCEPTION_IF(*result == CORE_RPC_STATUS_BUSY, tools::error::daemon_busy, "getversion");
|
|
||||||
if (*result != CORE_RPC_STATUS_OK)
|
|
||||||
{
|
|
||||||
MDEBUG("Cannot determine daemon RPC version, not requesting rct distribution");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rpc_version >= MAKE_CORE_RPC_VERSION(1, 19))
|
|
||||||
{
|
|
||||||
MDEBUG("Daemon is recent enough, requesting rct distribution");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MDEBUG("Daemon is too old, not requesting rct distribution");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cryptonote::COMMAND_RPC_GET_OUTPUT_DISTRIBUTION::request req = AUTO_VAL_INIT(req);
|
cryptonote::COMMAND_RPC_GET_OUTPUT_DISTRIBUTION::request req = AUTO_VAL_INIT(req);
|
||||||
cryptonote::COMMAND_RPC_GET_OUTPUT_DISTRIBUTION::response res = AUTO_VAL_INIT(res);
|
cryptonote::COMMAND_RPC_GET_OUTPUT_DISTRIBUTION::response res = AUTO_VAL_INIT(res);
|
||||||
|
|
Loading…
Reference in a new issue