aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-12-30 09:36:18 +0200
committerRiccardo Spagni <ric@spagni.net>2015-12-30 09:36:18 +0200
commita7e56870fed29fb6d464d772100220b6d8f97225 (patch)
treed464a05b5731adcb662260c2e20c19fffe3048d9 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #566 (diff)
parentblockchain: remove obsolete containers (diff)
downloadmonero-a7e56870fed29fb6d464d772100220b6d8f97225.tar.xz
Merge pull request #568
b0541a5 blockchain: remove obsolete containers (moneromooo-monero) 18a5211 blockchain: Fix height in call to on_blockchain_dec (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 71a2b8841..feb31f2fc 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -490,7 +490,7 @@ block Blockchain::pop_block_from_blockchain()
}
}
}
- m_tx_pool.on_blockchain_dec(m_blocks.size()-1, get_tail_id());
+ m_tx_pool.on_blockchain_dec(m_db->height()-1, get_tail_id());
return popped_block;
}
@@ -499,11 +499,7 @@ bool Blockchain::reset_and_set_genesis_block(const block& b)
{
LOG_PRINT_L3("Blockchain::" << __func__);
CRITICAL_REGION_LOCAL(m_blockchain_lock);
- m_transactions.clear();
- m_blocks.clear();
- m_blocks_index.clear();
m_alternative_chains.clear();
- m_outputs.clear();
m_db->reset();
block_verification_context bvc = boost::value_initialized<block_verification_context>();
@@ -1251,7 +1247,7 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id
{
// if block parent is not part of main chain or an alternate chain,
// we ignore it
- CHECK_AND_ASSERT_MES(parent_in_main, false, "internal error: broken imperative condition it_main_prev != m_blocks_index.end()");
+ CHECK_AND_ASSERT_MES(parent_in_main, false, "internal error: broken imperative condition: parent_in_main");
complete_timestamps_vector(m_db->get_block_height(b.prev_id), timestamps);
}