From 008a54ddc4c2e8d914ea3d63e0d11679da0e427b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 24 Aug 2015 18:40:19 +0100 Subject: [PATCH] blockchain: change code to mirror original CN code I'm not quite sure the two are equivalent, so use the original CN expression for safety and verification purposes. --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 56eae7901..5620466fc 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1195,7 +1195,7 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id // make sure block connects correctly to the main chain auto h = m_db->get_block_hash_from_height(alt_chain.front()->second.height - 1); CHECK_AND_ASSERT_MES(h == alt_chain.front()->second.bl.prev_id, false, "alternative chain has wrong connection to main chain"); - complete_timestamps_vector(m_db->get_block_height(alt_chain.front()->second.bl.prev_id), timestamps); + complete_timestamps_vector(alt_chain.front()->second.height - 1, timestamps); } // if block not associated with known alternate chain else