auto resync fix

This commit is contained in:
admin@arionum.com
2019-10-18 07:42:57 +03:00
parent 09d3dd51ba
commit 73be045de9

View File

@@ -620,7 +620,7 @@ if ($current['height'] < $largest_height && $largest_height > 1) {
if ($block_parse_failed==true||$argv[1]=="resync") {
$last_resync=$db->single("SELECT val FROM config WHERE cfg='last_resync'");
if ($last_resync<time()-(3600*24)||$argv[1]=="resync") {
if ((($current['date']<time()-(3600*72))&&$_config['auto_resync'])!==false||$argv[1]=="resync") {
if (((($current['date']<time()-(3600*72))&&$_config['auto_resync'])!==false)||$argv[1]=="resync") {
$db->run("SET foreign_key_checks=0;");
$tables = ["accounts", "transactions", "mempool", "masternode","blocks"];
foreach ($tables as $table) {