aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-08-09 18:07:44 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-08-09 18:07:44 +0100
commit275894cdefeb80095b4b3463ec732c6e728f91b9 (patch)
tree7667f4d4d05e795ca1696a541c8d6fd252c69112 /src/blockchain_db/lmdb/db_lmdb.cpp
parentMerge pull request #358 (diff)
downloadmonero-275894cdefeb80095b4b3463ec732c6e728f91b9.tar.xz
blockchain: always select random outs using triangular distribution
It was only used by the older blockchain_storage. We also move the code to the calling blockchain level, to avoid replicating the code in every DB implementation. This also makes the get_random_out method obsolete, and we delete it.
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.cpp')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index dd829f3b0..d231322f6 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -1620,19 +1620,6 @@ uint64_t BlockchainLMDB::get_tx_block_height(const crypto::hash& h) const
return *(const uint64_t*)result.mv_data;
}
-//FIXME: make sure the random method used here is appropriate
-uint64_t BlockchainLMDB::get_random_output(const uint64_t& amount) const
-{
- LOG_PRINT_L3("BlockchainLMDB::" << __func__);
- check_open();
-
- uint64_t num_outputs = get_num_outputs(amount);
- if (num_outputs == 0)
- throw1(OUTPUT_DNE("Attempting to get a random output for an amount, but none exist"));
-
- return crypto::rand<uint64_t>() % num_outputs;
-}
-
uint64_t BlockchainLMDB::get_num_outputs(const uint64_t& amount) const
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);