Skip to content

Commit

Permalink
Fix Blockchain::get_tail_id() to set parameter to last block number i…
Browse files Browse the repository at this point in the history
…nstead of height

This reflects the behavior of blockchain_storage::get_tail_id().

Fixes monero-project#27 so that RPC method getlastblockheader works.
  • Loading branch information
warptangent committed Feb 22, 2015
1 parent 963bc09 commit b88ab64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ crypto::hash Blockchain::get_tail_id(uint64_t& height) const
{
LOG_PRINT_L3("Blockchain::" << __func__);
CRITICAL_REGION_LOCAL(m_blockchain_lock);
height = m_db->height();
height = m_db->height() - 1;
return get_tail_id();
}
//------------------------------------------------------------------
Expand Down

0 comments on commit b88ab64

Please sign in to comment.