Merge branch 'arionum:master' into master

This commit is contained in:
Ario Sius
2022-08-18 12:37:56 +02:00
committed by GitHub
2 changed files with 9 additions and 8 deletions

View File

@@ -450,15 +450,16 @@ class Block
$blacklist[]=san($x['message']); $blacklist[]=san($x['message']);
} }
} }
$r=$db->run("SELECT public_key FROM masternode WHERE voted=1"); if($height>=1641600){
foreach ($r as $masternode) { $r=$db->run("SELECT public_key FROM masternode WHERE voted=1");
if (!in_array($masternode, $blacklist)) { foreach ($r as $masternode) {
_log("Masternode removed from voting blacklist - $masternode", 3); if (!in_array($masternode['public_key'], $blacklist)) {
$this->add_log($hash, ["table"=>"masternode", "key"=>"public_key","id"=>$masternode, "vals"=>['voted'=>1]]); _log("Masternode removed from voting blacklist - $masternode[public_key]", 3);
$db->run("UPDATE masternode SET voted=0 WHERE public_key=:pub", [":pub"=>$masternode]); $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) { foreach ($blacklist as $masternode) {
$res=$db->single("SELECT voted FROM masternode WHERE public_key=:pub", [":pub"=>$masternode]); $res=$db->single("SELECT voted FROM masternode WHERE public_key=:pub", [":pub"=>$masternode]);
if ($res==0) { if ($res==0) {

View File

@@ -1,6 +1,6 @@
<?php <?php
// ARO version // ARO version
define("VERSION", "1.0.0-alpha.6"); define("VERSION", "1.0.0-alpha.7");
// UTC timezone by default // UTC timezone by default
date_default_timezone_set("UTC"); date_default_timezone_set("UTC");