diff options
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.h')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index 6a2646816..6f2262546 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -191,7 +191,7 @@ public: ); virtual void set_batch_transactions(bool batch_transactions); - virtual void batch_start(); + virtual void batch_start(uint64_t batch_num_blocks=0); virtual void batch_commit(); virtual void batch_stop(); virtual void batch_abort(); @@ -199,9 +199,11 @@ public: virtual void pop_block(block& blk, std::vector<transaction>& txs); private: - void do_resize(); + void do_resize(uint64_t size_increase=0); - bool need_resize() const; + bool need_resize(uint64_t threshold_size=0) const; + void check_and_resize_for_batch(uint64_t batch_num_blocks); + uint64_t get_estimated_batch_size(uint64_t batch_num_blocks) const; virtual void add_block( const block& blk , const size_t& block_size |