From 8d12a8df2cf27713509c039c91fb9180e010011a Mon Sep 17 00:00:00 2001 From: warptangent Date: Fri, 4 Mar 2016 10:59:20 -0800 Subject: Schema update: tx_indices - improve further with less indirection --- src/blockchain_db/lmdb/db_lmdb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/blockchain_db/lmdb/db_lmdb.h') 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 &offsets, std::vector &indices); virtual void get_output_global_indices(const uint64_t& amount, const std::vector &offsets, std::vector &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& amount_output_indices, std::vector& global_output_indices) const; - virtual std::vector get_tx_amount_output_indices(const crypto::hash& h) const; + virtual std::vector 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); -- cgit v1.2.3