mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Update with small fixes for the comms system.
This commit is contained in:
+7
-1
@@ -643,7 +643,7 @@ function Database(){
|
||||
cursor.close();
|
||||
txn.commit();
|
||||
if (highestBlock !== null) {
|
||||
debug("Got the oldest locked block in the system at height: " + highestBlock);
|
||||
debug("Got the oldest locked block in the system at height: " + JSON.stringify(highestBlock));
|
||||
} else {
|
||||
debug("There are no unlocked blocks in the system. Woohoo!");
|
||||
}
|
||||
@@ -682,6 +682,12 @@ function Database(){
|
||||
let oldestLockedBlock = this.getOldestLockedBlock();
|
||||
async.waterfall([
|
||||
function(callback){
|
||||
global.coinFuncs.getBlockHeaderByHash(oldestLockedBlock.hash, (err, result) => {
|
||||
oldestLockedBlock.height = result.height;
|
||||
callback(oldestLockedBlock);
|
||||
});
|
||||
},
|
||||
function(oldestLockedBlock, callback){
|
||||
global.coinFuncs.getLastBlockHeader(function(err, body){
|
||||
if (oldestLockedBlock === null){
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user