aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-02-22 10:38:23 -0800
committerwarptangent <warptangent@inbox.com>2015-02-22 10:41:41 -0800
commitb88ab643ca576b450944b0438ae1f606520204fe (patch)
tree49699930e11ebdef02d9ea0109cfc2a1db175731 /src/cryptonote_core
parentRevert "Bounds error, should fix #27" (diff)
downloadmonero-b88ab643ca576b450944b0438ae1f606520204fe.tar.xz
Fix Blockchain::get_tail_id() to set parameter to last block number instead of height
This reflects the behavior of blockchain_storage::get_tail_id(). Fixes #27 so that RPC method getlastblockheader works.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index b671fa71a..525c7f36e 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -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();
}
//------------------------------------------------------------------