Merge pull request #6893

4cf3545 core_rpc_server: on_get_blocks - forward bootstrap daemon error (xiphon)
remotes/1691602464505633909/tmp_refs/heads/wonerujo-v0.10.1
luigi1111 4 years ago
commit 8ae0110d54
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -521,9 +521,17 @@ namespace cryptonote
bool core_rpc_server::on_get_blocks(const COMMAND_RPC_GET_BLOCKS_FAST::request& req, COMMAND_RPC_GET_BLOCKS_FAST::response& res, const connection_context *ctx)
{
RPC_TRACKER(get_blocks);
bool r;
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_BLOCKS_FAST>(invoke_http_mode::BIN, "/getblocks.bin", req, res, r))
return r;
bool use_bootstrap_daemon;
{
boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex);
use_bootstrap_daemon = m_should_use_bootstrap_daemon;
}
if (use_bootstrap_daemon)
{
bool r;
return use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_BLOCKS_FAST>(invoke_http_mode::BIN, "/getblocks.bin", req, res, r);
}
CHECK_PAYMENT(req, res, 1);

Loading…
Cancel
Save