Merge pull request #277 from bobbieltd/patch-1

TypeError: Cannot read property 'height' of undefined
This commit is contained in:
Snipa22
2018-01-19 12:02:26 -08:00
committed by GitHub
+3 -1
View File
@@ -830,7 +830,9 @@ if (cluster.isMaster) {
registerPool();
setInterval(function () {
global.mysql.query("UPDATE pools SET last_checkin = ?, active = ? WHERE id = ?", [global.support.formatDate(Date.now()), true, global.config.pool_id]);
global.mysql.query("UPDATE pools SET blockIDTime = now(), blockID = ? where id = ?", [activeBlockTemplate.height, global.config.pool_id]);
if (activeBlockTemplate) {
global.mysql.query("UPDATE pools SET blockIDTime = now(), blockID = ? where id = ?", [activeBlockTemplate.height, global.config.pool_id]);
}
global.config.ports.forEach(function (portData) {
global.mysql.query("UPDATE ports SET lastSeen = now(), miners = ? WHERE pool_id = ? AND network_port = ?", [minerCount[portData.port], global.config.pool_id, portData.port]);
});