diff --git a/lib/local_comms.js b/lib/local_comms.js index 493bde7..9e52b4f 100644 --- a/lib/local_comms.js +++ b/lib/local_comms.js @@ -18,9 +18,9 @@ function Database(){ path: global.config.db_storage_path, maxDbs: 10, mapSize: 24 * 1024 * 1024 * 1024, - noSync: true, + noSync: false, mapAsync: true, - useWritemap: true, + useWritemap: false, noMetaSync: true, maxReaders: 512 }); @@ -477,12 +477,14 @@ function Database(){ this.refreshEnv = function(){ if (this.dirtyenv === true){ + /* console.log("Database Worker: Reloading LMDB Env"); global.database.env.sync(function(){ }); clearInterval(this.intervalID); global.database.env.close(); this.initEnv(); + */ } }; diff --git a/lib/worker.js b/lib/worker.js index f8c0486..6b0a171 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -449,6 +449,8 @@ function updateBlockHeader() { value: body.result.block_header.reward, ts: body.result.block_header.timestamp })]); + } else if (body.result.block_header.hash === lastBlockHash) { + console.debug("Block headers identical to historical header. Ignoring"); } else { console.error("GetLastBlockHeader Error during block header update"); } diff --git a/package.json b/package.json index 0c3842f..db30ebe 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "moment": "2.17.1", "multi-hashing": "git+https://github.com/Snipa22/node-multi-hashing-aesni.git", "mysql": "2.12.0", - "node-lmdb": "^0.4.3", + "node-lmdb": "0.4.12", "promise-mysql": "3.0.0", "protocol-buffers": "^3.2.1", "range": "0.0.3",