Fix: Blocks not being confirmed

Fixes an issue introduce with #610.
This commit is contained in:
Sebastian Grewe 2013-08-26 11:11:52 +02:00
parent 0a4047420b
commit 0e27cda093

View File

@ -121,9 +121,8 @@ class Block {
* @param confirmations int Required confirmations to consider block confirmed
* @return data array Array with database fields as keys
**/
public function getAllUnconfirmed() {
public function getAllUnconfirmed($confirmations=120) {
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE confirmations < ? AND confirmations > -1");
empty($this->config['network_confirmations']) ? $confirmations = 120 : $confirmations = $this->config['network_confirmations'];
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $confirmations) && $stmt->execute() && $result = $stmt->get_result())
return $result->fetch_all(MYSQLI_ASSOC);
return false;