mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Remove old function
This commit is contained in:
@@ -504,23 +504,6 @@ function updateWalletStats() {
|
||||
|
||||
}
|
||||
|
||||
function monitorNodes() {
|
||||
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");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function monitorNodes() {
|
||||
global.coinFuncs.getLastBlockHeader((err, block) => {
|
||||
if (err !== null) {
|
||||
|
||||
Reference in New Issue
Block a user