From 2a4c674bec2a66a8faad4da9ad07c3fd32567ca1 Mon Sep 17 00:00:00 2001 From: arionum <34399752+arionum@users.noreply.github.com> Date: Sun, 12 Jun 2022 18:43:34 +0300 Subject: [PATCH 1/2] Fix masternode voting removal --- include/block.inc.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/block.inc.php b/include/block.inc.php index 1ece8b5..779c960 100755 --- a/include/block.inc.php +++ b/include/block.inc.php @@ -339,15 +339,16 @@ class Block $blacklist[]=san($x['message']); } } - $r=$db->run("SELECT public_key FROM masternode WHERE voted=1"); - foreach ($r as $masternode) { - if (!in_array($masternode, $blacklist)) { - _log("Masternode removed from voting blacklist - $masternode", 3); - $this->add_log($hash, ["table"=>"masternode", "key"=>"public_key","id"=>$masternode, "vals"=>['voted'=>1]]); - $db->run("UPDATE masternode SET voted=0 WHERE public_key=:pub", [":pub"=>$masternode]); + if($height>=1641600){ + $r=$db->run("SELECT public_key FROM masternode WHERE voted=1"); + foreach ($r as $masternode) { + if (!in_array($masternode['public_key'], $blacklist)) { + _log("Masternode removed from voting blacklist - $masternode[public_key]", 3); + $this->add_log($hash, ["table"=>"masternode", "key"=>"public_key","id"=>$masternode['public_key'], "vals"=>['voted'=>1]]); + $db->run("UPDATE masternode SET voted=0 WHERE public_key=:pub", [":pub"=>$masternode['public_key']]); + } } } - foreach ($blacklist as $masternode) { $res=$db->single("SELECT voted FROM masternode WHERE public_key=:pub", [":pub"=>$masternode]); if ($res==0) { From 15844fa5802256f3b9028c2eeb25c0b731d8ca37 Mon Sep 17 00:00:00 2001 From: arionum <34399752+arionum@users.noreply.github.com> Date: Sun, 12 Jun 2022 18:45:04 +0300 Subject: [PATCH 2/2] bump version --- include/init.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/init.inc.php b/include/init.inc.php index 9cf9756..6c89e73 100755 --- a/include/init.inc.php +++ b/include/init.inc.php @@ -1,6 +1,6 @@