aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-10-25 10:45:25 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-10-25 12:36:11 +0000
commit5f397e441275d0e282a371bcdeed963c9a9b69f1 (patch)
tree4ed5d4039320b142710befac10cbb7e816cfe173 /src/cryptonote_core/blockchain.cpp
parentdb_bdb: record numbers for recno databases start at 1 (diff)
downloadmonero-5f397e441275d0e282a371bcdeed963c9a9b69f1.tar.xz
Add functions to iterate through blocks, txes, outputs, key images
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index c38b58841..08587491e 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3188,3 +3188,23 @@ bool Blockchain::get_hard_fork_voting_info(uint8_t version, uint32_t &window, ui
{
return m_hardfork->get_voting_info(version, window, votes, threshold, voting);
}
+
+bool Blockchain::for_all_key_images(std::function<bool(const crypto::key_image&)> f) const
+{
+ return m_db->for_all_key_images(f);
+}
+
+bool Blockchain::for_all_blocks(std::function<bool(uint64_t, const crypto::hash&, const block&)> f) const
+{
+ return m_db->for_all_blocks(f);
+}
+
+bool Blockchain::for_all_transactions(std::function<bool(const crypto::hash&, const cryptonote::transaction&)> f) const
+{
+ return m_db->for_all_transactions(f);
+}
+
+bool Blockchain::for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, size_t tx_idx)> f) const
+{
+ return m_db->for_all_outputs(f);;
+}