mirror of
https://github.com/monero-project/monero.git
synced 2025-08-17 16:00:37 -04:00
get_blockchain_top now returns void
It was always returning true, and could not be foreseen to usefully return errors in the future. This silences CID 162652 as well as saves some checking code in a few places.
This commit is contained in:
parent
2e44d8f23c
commit
b5faac5304
6 changed files with 9 additions and 31 deletions
|
@ -211,10 +211,9 @@ namespace cryptonote
|
|||
return m_blockchain_storage.get_current_blockchain_height();
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::get_blockchain_top(uint64_t& height, crypto::hash& top_id) const
|
||||
void core::get_blockchain_top(uint64_t& height, crypto::hash& top_id) const
|
||||
{
|
||||
top_id = m_blockchain_storage.get_tail_id(height);
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata,block>>& blocks, std::list<cryptonote::blobdata>& txs) const
|
||||
|
|
|
@ -299,10 +299,8 @@ namespace cryptonote
|
|||
*
|
||||
* @param height return-by-reference height of the block
|
||||
* @param top_id return-by-reference hash of the block
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
bool get_blockchain_top(uint64_t& height, crypto::hash& top_id) const;
|
||||
void get_blockchain_top(uint64_t& height, crypto::hash& top_id) const;
|
||||
|
||||
/**
|
||||
* @copydoc Blockchain::get_blocks(uint64_t, size_t, std::list<std::pair<cryptonote::blobdata,block>>&, std::list<transaction>&) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue