Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testdb: add override keyword where missing #5413

Merged
merged 1 commit into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions src/blockchain_db/berkeleydb/db_bdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down
1 change: 0 additions & 1 deletion src/blockchain_db/berkeleydb/db_bdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ class BlockchainBDB : public BlockchainDB
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;
Expand Down
Loading