aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
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.h
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.h')
-rw-r--r--src/cryptonote_core/blockchain.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 3a663a342..21bbfb447 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -165,6 +165,11 @@ namespace cryptonote
uint8_t get_ideal_hard_fork_version() const { return m_hardfork->get_ideal_version(); }
bool get_hard_fork_voting_info(uint8_t version, uint32_t &window, uint32_t &votes, uint32_t &threshold, uint8_t &voting) const;
+ bool for_all_key_images(std::function<bool(const crypto::key_image&)>) const;
+ bool for_all_blocks(std::function<bool(uint64_t, const crypto::hash&, const block&)>) const;
+ bool for_all_transactions(std::function<bool(const crypto::hash&, const cryptonote::transaction&)>) const;
+ bool for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, size_t tx_idx)>) const;
+
BlockchainDB& get_db()
{
return *m_db;