Removed on_idle() calls to Blockchain::store_blockchain() for lmdb.

Added option to cache tx-input verification results.
This commit is contained in:
NoodleDoodleNoodleDoodleNoodleDoodleNoo 2015-07-14 22:47:07 -07:00
parent 2e293a563e
commit 94ea3e8ed2
5 changed files with 53 additions and 17 deletions

View file

@ -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();