aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-10-15 18:33:53 -0400
committerwarptangent <warptangent@inbox.com>2015-01-04 18:41:44 -0800
commitbc44bc19f4fa9e7eabb1a1b82127398c1a201048 (patch)
treec8aee9100725ecc28c842461339d8edd630131bf /src/cryptonote_core/blockchain.cpp
parentAdding libglim as an external library (diff)
downloadmonero-bc44bc19f4fa9e7eabb1a1b82127398c1a201048.tar.xz
Initial commit of BlockchainDB tests, other misc
miscellaneous changes to BlockchainDB/blockchain as well, namely replacing instances of std::list with std::vector
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 828ad96e4..a35ce846c 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -547,11 +547,16 @@ bool Blockchain::get_block_by_hash(const crypto::hash &h, block &blk)
return false;
}
//------------------------------------------------------------------
+//FIXME: this function does not seem to be called from anywhere, but
+// if it ever is, should probably change std::list for std::vector
void Blockchain::get_all_known_block_ids(std::list<crypto::hash> &main, std::list<crypto::hash> &alt, std::list<crypto::hash> &invalid)
{
CRITICAL_REGION_LOCAL(m_blockchain_lock);
- main = m_db->get_hashes_range(0, m_db->height());
+ for (auto& a : m_db->get_hashes_range(0, m_db->height()))
+ {
+ main.push_back(a);
+ }
BOOST_FOREACH(blocks_ext_by_hash::value_type &v, m_alternative_chains)
alt.push_back(v.first);