aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-01 22:16:00 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-01 22:16:00 +0100
commit1593553e03aef8d44621aaf79a33ba25f69a2bd7 (patch)
treeeb2e86a6b9c08ea92930795d620b3214062910bd /src/blockchain_db/blockchain_db.h
parentMerge pull request #937 (diff)
downloadmonero-1593553e03aef8d44621aaf79a33ba25f69a2bd7.tar.xz
new unlocked parameter to output_histogram
This constrains the number of instances of any amount to the unlocked ones (as defined by the default unlock time setting: outputs with non default unlock time are not considered, so may be counted as unlocked even if they are not actually unlocked).
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/blockchain_db.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index ab5d2d44c..4c2157a39 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -1140,7 +1140,7 @@ public:
*
* @return the tx hash and output index
*/
- virtual tx_out_index get_output_tx_and_index(const uint64_t& amount, const uint64_t& index) = 0;
+ virtual tx_out_index get_output_tx_and_index(const uint64_t& amount, const uint64_t& index) const = 0;
/**
* @brief gets some outputs' tx hashes and indices
@@ -1153,7 +1153,7 @@ public:
* @param offsets a list of amount-specific output indices
* @param indices return-by-reference a list of tx hashes and output indices (as pairs)
*/
- virtual void get_output_tx_and_index(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<tx_out_index> &indices) = 0;
+ virtual void get_output_tx_and_index(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<tx_out_index> &indices) const = 0;
/**
* @brief gets outputs' data
@@ -1305,10 +1305,11 @@ public:
* @brief return a histogram of outputs on the blockchain
*
* @param amounts optional set of amounts to lookup
+ * @param unlocked whether to restrict count to unlocked outputs
*
* @return a set of amount/instances
*/
- virtual std::map<uint64_t, uint64_t> get_output_histogram(const std::vector<uint64_t> &amounts) const = 0;
+ virtual std::map<uint64_t, uint64_t> get_output_histogram(const std::vector<uint64_t> &amounts, bool unlocked) const = 0;
/**
* @brief is BlockchainDB in read-only mode?