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-17 23:15:36 +0000
commitaaf837cf5f5bc469591399f869467170133f1109 (patch)
tree1364e52e0c1d1df26c01da84243e2f1e5e130195 /src/rpc/bootstrap_daemon.cpp
parent83f1d863bd80e5e04c64dfa4d43edd132d1d21d2 (diff)
downloadmonzero-core-aaf837cf5f5bc469591399f869467170133f1109.tar.gz
monzero-core-aaf837cf5f5bc469591399f869467170133f1109.tar.xz
monzero-core-aaf837cf5f5bc469591399f869467170133f1109.zip
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)