mirror of
https://github.com/monero-project/monero.git
synced 2025-12-13 03:18:37 -05:00
Daemon RPC: /getblocks.bin return chain's top_block_hash in resp
This commit is contained in:
parent
cc73fe7116
commit
9f83e7434d
8 changed files with 18 additions and 10 deletions
|
|
@ -711,6 +711,7 @@ namespace cryptonote
|
|||
{
|
||||
res.start_height = 0;
|
||||
res.current_height = last_block_height + 1;
|
||||
res.top_block_hash = last_block_hash;
|
||||
res.status = CORE_RPC_STATUS_OK;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -730,7 +731,7 @@ namespace cryptonote
|
|||
}
|
||||
|
||||
std::vector<std::pair<std::pair<cryptonote::blobdata, crypto::hash>, std::vector<std::pair<crypto::hash, cryptonote::blobdata> > > > bs;
|
||||
if(!m_core.find_blockchain_supplement(req.start_height, req.block_ids, bs, res.current_height, res.start_height, req.prune, !req.no_miner_tx, max_blocks, COMMAND_RPC_GET_BLOCKS_FAST_MAX_TX_COUNT))
|
||||
if(!m_core.find_blockchain_supplement(req.start_height, req.block_ids, bs, res.current_height, res.top_block_hash, res.start_height, req.prune, !req.no_miner_tx, max_blocks, COMMAND_RPC_GET_BLOCKS_FAST_MAX_TX_COUNT))
|
||||
{
|
||||
res.status = "Failed";
|
||||
add_host_fail(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue