mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Update db_bdb.cpp
- bugfix: prevent re-entering db->get when current buffer contains all possible index values.
This commit is contained in:
parent
dbbc457836
commit
3381fd69a8
@ -1528,13 +1528,11 @@ void BlockchainBDB::get_output_tx_and_index(const uint64_t& amount,
|
|||||||
{
|
{
|
||||||
cur->get(&k, &data, DB_MULTIPLE | (curcount == 0 ? DB_SET : DB_NEXT_DUP));
|
cur->get(&k, &data, DB_MULTIPLE | (curcount == 0 ? DB_SET : DB_NEXT_DUP));
|
||||||
blockstart = curcount;
|
blockstart = curcount;
|
||||||
// skip counting if using single buffer, it actually adds some overhead on some systems.
|
|
||||||
if(!singlebuff)
|
int count = 0;
|
||||||
{
|
// fixme! this might be slow on some systems.
|
||||||
int count = 0;
|
DB_COUNT_RECORDS((DBT *) &data, count);
|
||||||
DB_COUNT_RECORDS((DBT *) &data, count);
|
curcount += count;
|
||||||
curcount += count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user