Adding network_confirmations to configuration
* Added new configuration option `$config['network_confirmations']` to dist config * Default to 120 if not set This will allow us to define a different confirmation level for user transactions but still display blocks at their approriate unconfirmed value when displaying them in the wallet information for admins. Risky for pool owners but still a viable option. Fixes #610
This commit is contained in:
parent
7e4c5dab4e
commit
1c24820735
@ -123,7 +123,8 @@ class Block {
|
|||||||
**/
|
**/
|
||||||
public function getAllUnconfirmed() {
|
public function getAllUnconfirmed() {
|
||||||
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE confirmations < ? AND confirmations > -1");
|
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE confirmations < ? AND confirmations > -1");
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $this->config['confirmations']) && $stmt->execute() && $result = $stmt->get_result())
|
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 $result->fetch_all(MYSQLI_ASSOC);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -349,7 +349,8 @@ $config['reward'] = 50;
|
|||||||
|
|
||||||
// Confirmations per block required to credit transactions, default: 120
|
// Confirmations per block required to credit transactions, default: 120
|
||||||
$config['confirmations'] = 120;
|
$config['confirmations'] = 120;
|
||||||
|
// Confirmations per block required in network to confirm its transactions, default: 120
|
||||||
|
$config['network_confirmations'] = 120;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Memcache configuration
|
* Memcache configuration
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user