diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-03-15 17:09:13 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-03-15 17:09:13 +0200 |
commit | 60af9d689b9ea6d5c44a8773cf8bf6f791e7ad41 (patch) | |
tree | 2e65c80666a49995a6ea16b1ea293fddf9da5403 | |
parent | Merge pull request #3403 (diff) | |
parent | Remove the `Blockchain::get_all_known_block_ids` function. (diff) | |
download | monero-60af9d689b9ea6d5c44a8773cf8bf6f791e7ad41.tar.xz |
Merge pull request #3408
e1b526b3 Remove the `Blockchain::get_all_known_block_ids` function. (Jean Pierre Dudey)
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 19 | ||||
-rw-r--r-- | src/cryptonote_core/blockchain.h | 9 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index d2d43490e..a0031559b 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -744,25 +744,6 @@ bool Blockchain::get_block_by_hash(const crypto::hash &h, block &blk, bool *orph 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) const -{ - LOG_PRINT_L3("Blockchain::" << __func__); - CRITICAL_REGION_LOCAL(m_blockchain_lock); - - for (auto& a : m_db->get_hashes_range(0, m_db->height() - 1)) - { - main.push_back(a); - } - - for (const blocks_ext_by_hash::value_type &v: m_alternative_chains) - alt.push_back(v.first); - - for (const blocks_ext_by_hash::value_type &v: m_invalid_blocks) - invalid.push_back(v.first); -} -//------------------------------------------------------------------ // This function aggregates the cumulative difficulties and timestamps of the // last DIFFICULTY_BLOCKS_COUNT blocks and passes them to next_difficulty, // returning the result of that call. Ignores the genesis block, and can use diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index dd490cdd5..1a52e20bf 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -207,15 +207,6 @@ namespace cryptonote bool get_block_by_hash(const crypto::hash &h, block &blk, bool *orphan = NULL) const; /** - * @brief get all block hashes (main chain, alt chains, and invalid blocks) - * - * @param main return-by-reference container to put result main chain blocks' hashes in - * @param alt return-by-reference container to put result alt chain blocks' hashes in - * @param invalid return-by-reference container to put result invalid blocks' hashes in - */ - void get_all_known_block_ids(std::list<crypto::hash> &main, std::list<crypto::hash> &alt, std::list<crypto::hash> &invalid) const; - - /** * @brief performs some preprocessing on a group of incoming blocks to speed up verification * * @param blocks a list of incoming blocks |