aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/bootstrap_daemon.cpp
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-11-17 23:15:36 +0000
committerxiphon <xiphon@protonmail.com>2020-11-23 12:24:01 +0000
commitaf4fb4729ed09139a1a48038fcfcf7da64092a58 (patch)
treefce96e24c6e993e70642a7b366f9ea2ee6cb4645 /src/rpc/bootstrap_daemon.cpp
parentMerge pull request #6997 (diff)
downloadmonero-af4fb4729ed09139a1a48038fcfcf7da64092a58.tar.xz
rpc: skip non-synced bootstrap daemons in --no-sync mode too
Diffstat (limited to 'src/rpc/bootstrap_daemon.cpp')
-rw-r--r--src/rpc/bootstrap_daemon.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/bootstrap_daemon.cpp b/src/rpc/bootstrap_daemon.cpp
index 6a0833f19..2fdd28406 100644
--- a/src/rpc/bootstrap_daemon.cpp
+++ b/src/rpc/bootstrap_daemon.cpp
@@ -45,12 +45,12 @@ namespace cryptonote
return host + ":" + m_http_client.get_port();
}
- boost::optional<uint64_t> bootstrap_daemon::get_height()
+ boost::optional<std::pair<uint64_t, uint64_t>> bootstrap_daemon::get_height()
{
- cryptonote::COMMAND_RPC_GET_HEIGHT::request req;
- cryptonote::COMMAND_RPC_GET_HEIGHT::response res;
+ cryptonote::COMMAND_RPC_GET_INFO::request req;
+ cryptonote::COMMAND_RPC_GET_INFO::response res;
- if (!invoke_http_json("/getheight", req, res))
+ if (!invoke_http_json("/getinfo", req, res))
{
return boost::none;
}
@@ -60,7 +60,7 @@ namespace cryptonote
return boost::none;
}
- return res.height;
+ return {{res.height, res.target_height}};
}
bool bootstrap_daemon::handle_result(bool success, const std::string &status)