mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+11
-7
@@ -581,12 +581,16 @@ function Database(){
|
||||
let oldestLockedBlock = this.getOldestLockedBlock();
|
||||
async.waterfall([
|
||||
function(callback){
|
||||
global.coinFuncs.getBlockHeaderByHash(oldestLockedBlock.hash, (err, result) => {
|
||||
oldestLockedBlock.height = result.height;
|
||||
console.log(`Got the oldest block`);
|
||||
callback(null, oldestLockedBlock);
|
||||
});
|
||||
},
|
||||
if (oldestLockedBlock === null) {
|
||||
callback(null, oldestLockedBlock)
|
||||
} else {
|
||||
global.coinFuncs.getBlockHeaderByHash(oldestLockedBlock.hash, (err, result) => {
|
||||
oldestLockedBlock.height = result.height;
|
||||
console.log(`Got the oldest block`);
|
||||
callback(null, oldestLockedBlock);
|
||||
});
|
||||
}
|
||||
},
|
||||
function(oldestLockedBlock, callback){
|
||||
global.coinFuncs.getLastBlockHeader(function(err, body){
|
||||
if (oldestLockedBlock === null){
|
||||
@@ -691,4 +695,4 @@ function Database(){
|
||||
}, 900000); // Set DB env reload for every 15 minutes.
|
||||
}
|
||||
|
||||
module.exports = Database;
|
||||
module.exports = Database;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
"jsonwebtoken": "^7.2.1",
|
||||
"minimist": "1.2.0",
|
||||
"moment": "2.17.1",
|
||||
"mysql": "2.12.0",
|
||||
"mysql": "2.15.0",
|
||||
"node-lmdb": "0.4.12",
|
||||
"promise-mysql": "3.0.0",
|
||||
"protocol-buffers": "^3.2.1",
|
||||
|
||||
Reference in New Issue
Block a user