diff --git a/README.md b/README.md index 80cb8ee..26f96f9 100644 --- a/README.md +++ b/README.md @@ -1 +1,38 @@ -# crawler-full-node \ No newline at end of file +# crawler-full-node + +### requirements +``` +php-7.4 +php-curl +php-mbstring +php-mysql +php-bcmath +``` + +#### database + +https://github.com/kvazar-network/database + +#### kevacoind + +https://github.com/kevacoin-project/kevacoin + +#### kevacoin.conf + +``` +rpcuser=user +rpcpassword=password +rpcport=9992 +server=1 +addressindex=1 +txindex=1 +rpcallowip=127.0.0.1 +whitelist=127.0.0.1 +``` + +#### crontab +``` +@reboot /path-to/kevacoind > /dev/null 2>&1 +* * * * * /path-to/kevacoind > /dev/null 2>&1 +* * * * * /path-to/php /path-to/crawler-full-node/crawler.php > /dev/null 2>&1 +``` diff --git a/crawler.php b/crawler.php index 332635b..3780577 100644 --- a/crawler.php +++ b/crawler.php @@ -19,7 +19,7 @@ if (false !== sem_acquire($semaphore, 1)) { $blockLast = $db->getLastBlock(); $blockTotal = $kevaCoin->getblockcount(); - if (!$blockTotal) { + if (false === $blockTotal) { echo "API connection error.\n"; exit; }