mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
TypeError: Cannot read property 'height' of undefined
I think the Interval could be called too soon and there isn't activeBlockTemplate yet. If I'm not right, you can cancel this PR. https://github.com/Snipa22/nodejs-pool/issues/269 https://github.com/Snipa22/nodejs-pool/issues/150
This commit is contained in:
+3
-1
@@ -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]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user