NodeJS is weird with async callbacks.

This commit is contained in:
Alexander Blair
2017-02-13 11:50:15 -08:00
parent 0efcd22a8a
commit 2b8b277725
+1 -1
View File
@@ -286,7 +286,7 @@ function calculatePPLNSPayments(blockHeader) {
}
cursor.close();
txn.abort();
callback(null, totalPaid);
setImmediate(callback, null, totalPaid);
}, function (totalPayment) {
blockCheckHeight = blockCheckHeight - 1;
debug("Decrementing the block chain check height to:" + blockCheckHeight);