diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-15 12:29:47 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-15 22:27:15 +0000 |
commit | d009f6dd6182ee448b12ece226909df21bac45a8 (patch) | |
tree | 9f57d702fad1ab9549cce4f44bd083feade29f78 /src/rpc/core_rpc_server.cpp | |
parent | blockchain: lock the blockchain while pruning (diff) | |
download | monero-d009f6dd6182ee448b12ece226909df21bac45a8.tar.xz |
rpc: fix get_block_hashes.bin from wallet on pruned blockchain
We want to get all blocks here, even pruned ones
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 39a8b4745..91e9021e0 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -432,17 +432,12 @@ namespace cryptonote if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_HASHES_FAST>(invoke_http_mode::BIN, "/gethashes.bin", req, res, r)) return r; - NOTIFY_RESPONSE_CHAIN_ENTRY::request resp; - - resp.start_height = req.start_height; - if(!m_core.find_blockchain_supplement(req.block_ids, resp)) + res.start_height = req.start_height; + if(!m_core.get_blockchain_storage().find_blockchain_supplement(req.block_ids, res.m_block_ids, res.start_height, res.current_height, false)) { res.status = "Failed"; return false; } - res.current_height = resp.total_height; - res.start_height = resp.start_height; - res.m_block_ids = std::move(resp.m_block_ids); res.status = CORE_RPC_STATUS_OK; return true; |