Merge pull request #635 from TheSerapher/issue-610
Fix: Blocks not being confirmed
This commit is contained in:
commit
c849dd0245
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user