aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/bootstrap_daemon.cpp
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-12-01 14:23:21 -0800
committerAlexander Blair <snipa@jagtech.io>2020-12-01 14:23:21 -0800
commit976fcb59859cc0ac0e965953974603dfd037c969 (patch)
tree4adfe02eb3e0fa9941535e40f5258ba458aa8625 /src/rpc/bootstrap_daemon.cpp
parentf41dce49acc89bd8672f3737e8e67f0efc8aacbd (diff)
parentaaf837cf5f5bc469591399f869467170133f1109 (diff)
downloadmonzero-core-976fcb59859cc0ac0e965953974603dfd037c969.tar.gz
monzero-core-976fcb59859cc0ac0e965953974603dfd037c969.tar.xz
monzero-core-976fcb59859cc0ac0e965953974603dfd037c969.zip
Merge pull request #7024
aaf837cf5 rpc: skip non-synced bootstrap daemons in --no-sync mode too (xiphon)
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)