aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/berkeleydb/db_bdb.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-17 08:27:35 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-17 08:27:36 +0200
commite9464eb5e39bbcc25550f17f44de6268fac77dd9 (patch)
treed023282b4a9acc496adf89d79e84fbb11225aa68 /src/blockchain_db/berkeleydb/db_bdb.cpp
parentMerge pull request #5455 (diff)
parenttestdb: add override keyword where missing (diff)
downloadmonero-e9464eb5e39bbcc25550f17f44de6268fac77dd9.tar.xz
Merge pull request #5413
5fafb90e testdb: add override keyword where missing (stoffu)
Diffstat (limited to 'src/blockchain_db/berkeleydb/db_bdb.cpp')
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp
index 3eb24494f..d138a1e7e 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.cpp
+++ b/src/blockchain_db/berkeleydb/db_bdb.cpp
@@ -1654,36 +1654,6 @@ tx_out_index BlockchainBDB::get_output_tx_and_index(const uint64_t& amount, cons
return indices[0];
}
-std::vector<uint64_t> BlockchainBDB::get_tx_output_indices(const crypto::hash& h) const
-{
- LOG_PRINT_L3("BlockchainBDB::" << __func__);
- check_open();
- std::vector<uint64_t> index_vec;
-
- bdb_cur cur(DB_DEFAULT_TX, m_tx_outputs);
-
- Dbt_copy<crypto::hash> k(h);
- Dbt_copy<uint32_t> v;
- auto result = cur->get(&k, &v, DB_SET);
- if (result == DB_NOTFOUND)
- throw1(OUTPUT_DNE("Attempting to get an output by tx hash and tx index, but output not found"));
- else if (result)
- throw0(DB_ERROR("DB error attempting to get an output"));
-
- db_recno_t num_elems = 0;
- cur->count(&num_elems, 0);
-
- for (uint64_t i = 0; i < num_elems; ++i)
- {
- index_vec.push_back(v);
- cur->get(&k, &v, DB_NEXT_DUP);
- }
-
- cur.close();
-
- return index_vec;
-}
-
std::vector<uint64_t> BlockchainBDB::get_tx_amount_output_indices(const crypto::hash& h) const
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);