mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
noticed blockchain does not synchronize properly
This commit is contained in:
parent
6fc2bab65b
commit
51c5bd4e67
2 changed files with 9 additions and 1 deletions
|
@ -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},
|
||||
|
|
Loading…
Reference in a new issue