aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/berkeleydb
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2019-04-09 18:38:53 +0900
committerstoffu <stoffu@protonmail.ch>2019-04-17 10:26:25 +0900
commit5fafb90e91cf5288505e4b8a669bc8340eb906e7 (patch)
tree877f30132fc6b781449c8481c36a9aa056bd3aa2 /src/blockchain_db/berkeleydb
parentMerge pull request #5430 (diff)
downloadmonero-5fafb90e91cf5288505e4b8a669bc8340eb906e7.tar.xz
testdb: add override keyword where missing
and delete obsolete BlockchainBDB::get_tx_output_indices along the way
Diffstat (limited to 'src/blockchain_db/berkeleydb')
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp30
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.h1
2 files changed, 0 insertions, 31 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__);
diff --git a/src/blockchain_db/berkeleydb/db_bdb.h b/src/blockchain_db/berkeleydb/db_bdb.h
index 04a33d7c6..3ae90efe1 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.h
+++ b/src/blockchain_db/berkeleydb/db_bdb.h
@@ -312,7 +312,6 @@ public:
virtual tx_out_index get_output_tx_and_index(const uint64_t& amount, const uint64_t& index);
virtual void get_output_tx_and_index(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<tx_out_index> &indices);
- virtual std::vector<uint64_t> get_tx_output_indices(const crypto::hash& h) const;
virtual std::vector<uint64_t> get_tx_amount_output_indices(const crypto::hash& h) const;
virtual bool has_key_image(const crypto::key_image& img) const;