aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/berkeleydb/db_bdb.cpp
diff options
context:
space:
mode:
authorNoodleDoodleNoodleDoodleNoodleDoodleNoo <NoodleDoodleNoodleDoodleNoodleDoodleNoo@users.noreply.github.com>2015-05-11 14:02:53 -0700
committerNoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com>2015-07-15 23:20:13 -0700
commit3381fd69a80ae0e5b1f1022abb5936052ddf89d9 (patch)
tree95fdc83efd61ca7890d5027c13b00882c607f4a3 /src/blockchain_db/berkeleydb/db_bdb.cpp
parentUpdate db_bdb.cpp (diff)
downloadmonero-3381fd69a80ae0e5b1f1022abb5936052ddf89d9.tar.xz
Update db_bdb.cpp
- bugfix: prevent re-entering db->get when current buffer contains all possible index values.
Diffstat (limited to 'src/blockchain_db/berkeleydb/db_bdb.cpp')
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp
index fdd2b5900..a8163d4b1 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.cpp
+++ b/src/blockchain_db/berkeleydb/db_bdb.cpp
@@ -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));
blockstart = curcount;
- // skip counting if using single buffer, it actually adds some overhead on some systems.
- if(!singlebuff)
- {
- int count = 0;
- DB_COUNT_RECORDS((DBT *) &data, count);
- curcount += count;
- }
+
+ int count = 0;
+ // fixme! this might be slow on some systems.
+ DB_COUNT_RECORDS((DBT *) &data, count);
+ curcount += count;
}
catch (const std::exception &e)
{