aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db
diff options
context:
space:
mode:
authorNoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com>2015-07-14 22:47:07 -0700
committerNoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com>2015-07-15 23:20:25 -0700
commit94ea3e8ed2835a7694c4c653f0092adc2d3b8e70 (patch)
tree916e82da3f91771d4e74172d2e6b7b61385fc6ee /src/blockchain_db
parentFixed binary size issue due to embedded checkpoint data. (diff)
downloadmonero-94ea3e8ed2835a7694c4c653f0092adc2d3b8e70.tar.xz
Removed on_idle() calls to Blockchain::store_blockchain() for lmdb.
Added option to cache tx-input verification results.
Diffstat (limited to 'src/blockchain_db')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 1304795fc..63ac54171 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -290,16 +290,15 @@ void BlockchainLMDB::do_resize(uint64_t increase_size)
mdb_env_stat(m_env, &mst);
- uint64_t new_mapsize = (double)mei.me_mapsize * RESIZE_FACTOR;
+ // add 1Gb per resize, instead of doing a percentage increase
+ uint64_t new_mapsize = (double) mei.me_mapsize + add_size;
+
// If given, use increase_size intead of above way of resizing.
// This is currently used for increasing by an estimated size at start of new
// batch txn.
if (increase_size > 0)
new_mapsize = mei.me_mapsize + increase_size;
- // add 1Gb per resize, instead of doing a percentage increase
- // uint64_t new_mapsize = (double) mei.me_mapsize + add_size;
-
new_mapsize += (new_mapsize % mst.ms_psize);
mdb_txn_safe::prevent_new_txns();