aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-10-26 17:56:39 +0200
committerRiccardo Spagni <ric@spagni.net>2015-10-26 17:56:55 +0200
commitdb68eca0de0949abe2955a8e496431d9be6fea1a (patch)
tree2e2f0edbb088e9e39ddf16008c88f5ede757d397 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #440 (diff)
parentblockchain_utilities: new blockchain_dump diagnostic tool (diff)
downloadmonero-db68eca0de0949abe2955a8e496431d9be6fea1a.tar.xz
Merge pull request #442
43bca0d blockchain_utilities: new blockchain_dump diagnostic tool (moneromooo-monero) 5f397e4 Add functions to iterate through blocks, txes, outputs, key images (moneromooo-monero) 0a5a5e8 db_bdb: record numbers for recno databases start at 1 (moneromooo-monero) 50dfdc0 db_bdb: DB_KEYEMPTY is also not found for non-top recon fields (moneromooo-monero) 572780e blockchain_db: use the DNE exceptions where appropriate (moneromooo-monero)
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 306530f02..99d654bb1 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);;
+}