aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-06-04 14:18:37 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:28:11 +0100
commiteb56d0f9941d4aed9d89a20007221cecd1dc6cbc (patch)
treed64620722d53d8e5aa07d14eb40c7377a5158471 /src/blockchain_db/lmdb/db_lmdb.h
parentringct: restore verRange check in debug mode (diff)
downloadmonero-eb56d0f9941d4aed9d89a20007221cecd1dc6cbc.tar.xz
blockchain_db: add functions for adding/removing/getting rct commitments
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.h')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index d60701bbe..9e92b0661 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -30,6 +30,7 @@
#include "blockchain_db/blockchain_db.h"
#include "cryptonote_protocol/blobdatatype.h" // for type blobdata
+#include "ringct/rctTypes.h"
#include <boost/thread/tss.hpp>
#include <lmdb.h>
@@ -54,6 +55,8 @@ typedef struct mdb_txn_cursors
MDB_cursor *m_txc_spent_keys;
+ MDB_cursor *m_txc_rct_commitments;
+
MDB_cursor *m_txc_hf_versions;
} mdb_txn_cursors;
@@ -66,6 +69,7 @@ typedef struct mdb_txn_cursors
#define m_cur_tx_indices m_cursors->m_txc_tx_indices
#define m_cur_tx_outputs m_cursors->m_txc_tx_outputs
#define m_cur_spent_keys m_cursors->m_txc_spent_keys
+#define m_cur_rct_commitments m_cursors->m_txc_rct_commitments
#define m_cur_hf_versions m_cursors->m_txc_hf_versions
typedef struct mdb_rflags
@@ -80,6 +84,7 @@ typedef struct mdb_rflags
bool m_rf_tx_indices;
bool m_rf_tx_outputs;
bool m_rf_spent_keys;
+ bool m_rf_rct_commitments;
bool m_rf_hf_versions;
} mdb_rflags;
@@ -231,6 +236,11 @@ public:
virtual bool has_key_image(const crypto::key_image& img) const;
+ virtual uint64_t get_num_rct_outputs() const;
+ virtual rct::key get_rct_commitment(uint64_t idx) const;
+ virtual uint64_t add_rct_commitment(const rct::key &commitment);
+ virtual void remove_rct_commitment(uint64_t idx);
+
virtual bool for_all_key_images(std::function<bool(const crypto::key_image&)>) const;
virtual bool for_all_blocks(std::function<bool(uint64_t, const crypto::hash&, const cryptonote::block&)>) const;
virtual bool for_all_transactions(std::function<bool(const crypto::hash&, const cryptonote::transaction&)>) const;
@@ -359,6 +369,8 @@ private:
MDB_dbi m_spent_keys;
+ MDB_dbi m_rct_commitments;
+
MDB_dbi m_hf_starting_heights;
MDB_dbi m_hf_versions;