Use actual batch size for resize estimates

And optimize import startup:

Remember start_height position during initial count_blocks pass
to avoid having to reread entire file again to arrive at start_height
This commit is contained in:
Howard Chu 2017-09-17 00:12:42 +01:00
parent 7abdba0a5c
commit d2d8a41c47
No known key found for this signature in database
GPG key ID: FD2A70B44AB11BA7
8 changed files with 135 additions and 67 deletions

View file

@ -53,7 +53,7 @@ public:
virtual std::string get_db_name() const { return std::string(); }
virtual bool lock() { return true; }
virtual void unlock() { }
virtual bool batch_start(uint64_t batch_num_blocks=0) { return true; }
virtual bool batch_start(uint64_t batch_num_blocks=0, uint64_t batch_bytes=0) { return true; }
virtual void batch_stop() {}
virtual void set_batch_transactions(bool) {}
virtual void block_txn_start(bool readonly=false) {}