mirror of
https://github.com/monero-project/monero.git
synced 2024-12-28 06:29:25 -05:00
Update db_bdb.cpp
This commit is contained in:
parent
da1d3c01de
commit
4b7ad2b0a7
@ -65,11 +65,23 @@ struct bdb_cur
|
||||
done = false;
|
||||
}
|
||||
|
||||
~bdb_cur() { close(); }
|
||||
~bdb_cur()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
operator Dbc*() { return m_cur; }
|
||||
operator Dbc**() { return &m_cur; }
|
||||
Dbc* operator->() { return m_cur; }
|
||||
operator Dbc*()
|
||||
{
|
||||
return m_cur;
|
||||
}
|
||||
operator Dbc**()
|
||||
{
|
||||
return &m_cur;
|
||||
}
|
||||
Dbc* operator->()
|
||||
{
|
||||
return m_cur;
|
||||
}
|
||||
|
||||
void close()
|
||||
{
|
||||
@ -105,7 +117,7 @@ const char* const BDB_OUTPUT_KEYS = "output_keys";
|
||||
|
||||
const char* const BDB_SPENT_KEYS = "spent_keys";
|
||||
|
||||
const int BUFFER_LENGTH = 32 * 1024 * 1024;
|
||||
const int BUFFER_LENGTH = 4 * 1024 * 1024;
|
||||
|
||||
template<typename T>
|
||||
struct Dbt_copy: public Dbt
|
||||
@ -841,7 +853,7 @@ std::vector<std::string> BlockchainBDB::get_filenames() const
|
||||
|
||||
std::vector<std::string> full_paths;
|
||||
|
||||
for (auto& filename : filenames)
|
||||
for (auto& filename : filenames)
|
||||
{
|
||||
boost::filesystem::path p(m_folder);
|
||||
p /= filename;
|
||||
@ -1282,7 +1294,7 @@ std::vector<transaction> BlockchainBDB::get_tx_list(const std::vector<crypto::ha
|
||||
check_open();
|
||||
std::vector<transaction> v;
|
||||
|
||||
for (auto& h : hlist)
|
||||
for (auto& h : hlist)
|
||||
{
|
||||
v.push_back(get_tx(h));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user