filter
This commit is contained in:
@@ -267,10 +267,10 @@ $this->reset_fails_masternodes($mn_winner, $height, $hash);
|
||||
}
|
||||
}elseif($height>=80458){
|
||||
$type=$height%2;
|
||||
$current=$db->row("SELECT difficulty from blocks ORDER by height DESC LIMIT 1,1");
|
||||
$current=$db->row("SELECT difficulty from blocks WHERE height<=:h ORDER by height DESC LIMIT 1,1",[":h"=>$height]);
|
||||
$blks=0;
|
||||
$total_time=0;
|
||||
$blk = $db->run("SELECT `date`, height FROM blocks ORDER by height DESC LIMIT 20");
|
||||
$blk = $db->run("SELECT `date`, height FROM blocks WHERE height<=:h ORDER by height DESC LIMIT 20",[":h"=>$height]);
|
||||
for ($i=0;$i<19;$i++) {
|
||||
$ctype=$blk[$i+1]['height']%2;
|
||||
$time=$blk[$i]['date']-$blk[$i+1]['date'];
|
||||
|
||||
@@ -378,6 +378,10 @@ class Transaction
|
||||
_log("The Masternode IP is invalid", 3);
|
||||
return false;
|
||||
}
|
||||
$existing=$db->single("SELECT COUNT(1) FROM masternode WHERE public_key=:id or ip=:ip",["id"=>$x['public_key'], ":ip"=>$message]);
|
||||
if($existing!=0){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user