[all tools] Factor out open_bm() and open_tm.

Many duplicates of this code.
This commit is contained in:
Joe Thornber
2017-10-05 11:53:40 +01:00
parent 924a996fa7
commit 3c761e6822
11 changed files with 44 additions and 122 deletions

View File

@@ -80,16 +80,6 @@ namespace local {
//--------------------------------
transaction_manager::ptr
open_tm(block_manager<>::ptr bm) {
space_map::ptr sm(new core_map(bm->get_nr_blocks()));
sm->inc(superblock_detail::SUPERBLOCK_LOCATION);
transaction_manager::ptr tm(new transaction_manager(bm, sm));
return tm;
}
//--------------------------------
struct mapping {
mapping()
: vbegin_(0),