Update with fixes to finish getting AEON working and to block things from blocking when I don't expect them to.

AEON has a block on the way it does chain saving, which can lock up many portions of the blockManager daemon.  This is now patched in blockmanager.
This commit is contained in:
Alexander Blair
2017-10-13 12:01:19 -07:00
parent 5d31708abf
commit 667bc5a029
7 changed files with 81 additions and 51 deletions
+10 -3
View File
@@ -16,7 +16,10 @@ function updateShareStats() {
let activeAddresses = [];
async.waterfall([
function (callback) {
global.coinFuncs.getLastBlockHeader(function (body) {
global.coinFuncs.getLastBlockHeader(function (err, body) {
if (err !== null){
return callback(err, "Invalid block header");
}
callback(null, body.height + 1);
});
},
@@ -493,8 +496,12 @@ function updateWalletStats() {
}
function monitorNodes() {
global.mysql.query("SELECT blockID FROM pools WHERE last_checkin > date_sub(now(), interval 30 minute)").then(function (rows) {
global.coinFuncs.getLastBlockHeader(function (block) {
global.mysql.query("SELECT blockID, hostname, ip FROM pools WHERE last_checkin > date_sub(now(), interval 30 minute)").then(function (rows) {
global.coinFuncs.getLastBlockHeader(function (err, block) {
if (err !== null){
console.error("Issue in getting block header. Skipping node monitor");
return;
}
rows.forEach(function (row) {
if (row.blockID < block.height - 3) {
global.support.sendEmail(global.config.general.adminEmail, "Pool server behind in blocks", "The pool server: "+row.hostname+" with IP: "+row.ip+" is "+block.height - row.blockID+ " blocks behind");