@ -38,7 +38,11 @@ namespace xmreg
//db_flags |= MDB_RDONLY;
//db_flags |= MDB_NOLOCK;
db_flags |= MDB_NOSYNC;
//db_flags |= MDB_SYNC;
uint64_t DEFAULT_FLAGS = MDB_NOMETASYNC | MDB_NORDAHEAD;
db_flags = DEFAULT_FLAGS;
BlockchainDB* db = nullptr;
db = new BlockchainLMDB();
@ -61,9 +61,13 @@ namespace xmreg {
//get current server timestamp
time_t server_timestamp = std::time(nullptr);
core_storage->get_db().sync();
// get the current blockchain height. Just to check if it reads ok.
uint64_t height = core_storage->get_current_blockchain_height() - 1;
fmt::print("Current height: {:d}\n", height);
// initalise page tempate map with basic info about blockchain
mstch::map context {
{"refresh", refresh_page},