diff --git a/lib/local_comms.js b/lib/local_comms.js index ef379c5..f8afb96 100644 --- a/lib/local_comms.js +++ b/lib/local_comms.js @@ -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){ /*