From 5d1af0506a7243db77f24b6cf1f3d57ec493273c Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Fri, 16 Jun 2017 10:19:14 -0700 Subject: [PATCH] Adding a block so that if there's not an activeBlockTemplate the system will kick out the miner to avoid the system crashing on reboot/startup. --- lib/pool.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pool.js b/lib/pool.js index 01ca3be..b687af9 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -292,6 +292,10 @@ function Miner(id, login, pass, ipAddress, startingDiff, messageSender, protoVer this.error = "Exchange addresses need payment IDs"; this.valid_miner = false; } + if (!activeBlockTemplate){ + this.error = "No active block template"; + this.valid_miner = false; + } this.id = id; this.ipAddress = ipAddress;