bugfix for mn voting at 320000
This commit is contained in:
@@ -96,9 +96,13 @@ class Block
|
|||||||
|
|
||||||
if ($height>=80458) {
|
if ($height>=80458) {
|
||||||
//reward the masternode
|
//reward the masternode
|
||||||
|
// do not reward blacklisted mns after 320000
|
||||||
|
$check_mn_votes="";
|
||||||
|
if ($height>320000) {
|
||||||
|
$check_mn_votes="and voted=0";
|
||||||
|
}
|
||||||
$mn_winner=$db->single(
|
$mn_winner=$db->single(
|
||||||
"SELECT public_key FROM masternode WHERE status=1 AND blacklist<:current AND height<:start ORDER by last_won ASC, public_key ASC LIMIT 1",
|
"SELECT public_key FROM masternode WHERE status=1 AND blacklist<:current AND height<:start $check_mn_votes ORDER by last_won ASC, public_key ASC LIMIT 1",
|
||||||
[":current"=>$height, ":start"=>$height-360]
|
[":current"=>$height, ":start"=>$height-360]
|
||||||
);
|
);
|
||||||
_log("MN Winner: $mn_winner", 2);
|
_log("MN Winner: $mn_winner", 2);
|
||||||
@@ -921,8 +925,14 @@ class Block
|
|||||||
if ($height>=80458) {
|
if ($height>=80458) {
|
||||||
//reward the masternode
|
//reward the masternode
|
||||||
|
|
||||||
|
// do not reward blacklisted mns after 320000
|
||||||
|
$check_mn_votes="";
|
||||||
|
if ($height>320000) {
|
||||||
|
$check_mn_votes="and voted=0";
|
||||||
|
}
|
||||||
|
|
||||||
$mn_winner=$db->single(
|
$mn_winner=$db->single(
|
||||||
"SELECT public_key FROM masternode WHERE status=1 AND blacklist<:current AND height<:start ORDER by last_won ASC, public_key ASC LIMIT 1",
|
"SELECT public_key FROM masternode WHERE status=1 AND blacklist<:current AND height<:start $check_mn_votes ORDER by last_won ASC, public_key ASC LIMIT 1",
|
||||||
[":current"=>$height, ":start"=>$height-360]
|
[":current"=>$height, ":start"=>$height-360]
|
||||||
);
|
);
|
||||||
_log("MN Winner: $mn_winner", 2);
|
_log("MN Winner: $mn_winner", 2);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// ARO version
|
// ARO version
|
||||||
define("VERSION", "1.0.0-alpha.3");
|
define("VERSION", "1.0.0-alpha.4");
|
||||||
// UTC timezone by default
|
// UTC timezone by default
|
||||||
date_default_timezone_set("UTC");
|
date_default_timezone_set("UTC");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user