mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
core_rpc_server: on_get_blocks - forward bootstrap daemon error
This commit is contained in:
parent
d27d4526fe
commit
4cf3545a31
1 changed files with 11 additions and 3 deletions
|
@ -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)
|
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);
|
RPC_TRACKER(get_blocks);
|
||||||
|
|
||||||
|
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;
|
bool r;
|
||||||
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_BLOCKS_FAST>(invoke_http_mode::BIN, "/getblocks.bin", req, res, r))
|
return use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_BLOCKS_FAST>(invoke_http_mode::BIN, "/getblocks.bin", req, res, r);
|
||||||
return r;
|
}
|
||||||
|
|
||||||
CHECK_PAYMENT(req, res, 1);
|
CHECK_PAYMENT(req, res, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue