diff --git a/include/pages/admin/checks/check_daemon.inc.php b/include/pages/admin/checks/check_daemon.inc.php index 06645ade..a4d44507 100644 --- a/include/pages/admin/checks/check_daemon.inc.php +++ b/include/pages/admin/checks/check_daemon.inc.php @@ -13,8 +13,7 @@ try { $newerror['helplink'] = "https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-local-wallet-rpc"; $error[] = $newerror; $newerror = null; - } - else { + } else { // validate that the wallet service is not in test mode if ($bitcoin->is_testnet() == true) { $newerror = array(); @@ -27,6 +26,18 @@ try { $error[] = $newerror; $newerror = null; } + // Check if chain is currently downloading + if ($dDownloadPercentage = $bitcoin->getblockchaindownload()) { + $newerror = array(); + $newerror['name'] = "Coin daemon"; + $newerror['level'] = 1; + $newerror['extdesc'] = "Your coin daemon is currently downloading the blockchain. Your miners won't be able to connect until this is completed."; + $newerror['description'] = "Blockchain download progress is at an estimated $dDownloadPercentage%. It may take a while to complete."; + $newerror['configvalue'] = "wallet.host"; + $newerror['helplink'] = "https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-local-wallet-rpc"; + $error[] = $newerror; + $newerror = null; + } // check if there is more than one account set on wallet $accounts = $bitcoin->listaccounts(); if (count($accounts) > 1 && $accounts[''] <= 0) {