Skip to content

Commit

Permalink
Merge pull request #6893
Browse files Browse the repository at this point in the history
4cf3545 core_rpc_server: on_get_blocks - forward bootstrap daemon error (xiphon)
  • Loading branch information
luigi1111 committed Oct 13, 2020
2 parents a9178e3 + 4cf3545 commit 8ae0110
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/rpc/core_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8ae0110

Please sign in to comment.