aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
diff options
context:
space:
mode:
authorwarptangent <warptangent@tutanota.com>2016-03-04 10:59:20 -0800
committerHoward Chu <hyc@symas.com>2016-04-05 20:54:06 +0100
commit8d12a8df2cf27713509c039c91fb9180e010011a (patch)
treee5e6c8cd7ebd0344aaaad4c4a347a3a04ad65d12 /src/blockchain_db/lmdb/db_lmdb.h
parentAdd batch warning for further review (diff)
downloadmonero-8d12a8df2cf27713509c039c91fb9180e010011a.tar.xz
Schema update: tx_indices - improve further with less indirection
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 41dccfede..ef47ea5f7 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -212,6 +212,7 @@ public:
virtual uint64_t height() const;
virtual bool tx_exists(const crypto::hash& h) const;
+ virtual bool tx_exists(const crypto::hash& h, uint64_t& tx_index) const;
virtual uint64_t get_tx_unlock_time(const crypto::hash& h) const;
@@ -237,11 +238,11 @@ public:
virtual void get_output_tx_and_index(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<tx_out_index> &indices);
virtual void get_output_global_indices(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<uint64_t> &indices);
- virtual void get_amount_and_global_output_indices(const crypto::hash& h,
+ virtual void get_amount_and_global_output_indices(const uint64_t tx_index,
std::vector<uint64_t>& amount_output_indices,
std::vector<uint64_t>& global_output_indices) const;
- virtual std::vector<uint64_t> get_tx_amount_output_indices(const crypto::hash& h) const;
+ virtual std::vector<uint64_t> get_tx_amount_output_indices(const uint64_t tx_index) const;
virtual bool has_key_image(const crypto::key_image& img) const;
@@ -307,7 +308,7 @@ private:
virtual void remove_output(const tx_out& tx_output);
- void remove_tx_outputs(const crypto::hash& tx_hash, const transaction& tx);
+ void remove_tx_outputs(const uint64_t tx_index, const transaction& tx);
void remove_output(const uint64_t& out_index, const uint64_t amount);
void remove_amount_output_index(const uint64_t amount, const uint64_t global_output_index);