-
Notifications
You must be signed in to change notification settings - Fork 1
/
generalPool.php
46 lines (39 loc) · 1.11 KB
/
generalPool.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
require_once("DataType.php");
abstract class generalPool extends DataType
{
//Generate Address Worker Coin from DB
public function setBasicData($addr,$workerID,$CoinInput){
$this->Address = $addr;
$this->Worker = $workerID;
$this->Coin = $CoinInput;
}
//Generate HashRate HashRate_LongTerm Balance from DB
abstract public function getDataFromPool();
//Reset Class while error!
abstract public function reset();
//abstract protected function dataProcessed();
public function print(){
echo("Address:".$this->Address."<br>");
echo("Worker:".$this->Worker."<br>");
echo("HashRate:".$this->HashRate."<br>");
echo("HashRate_LongTerm:".$this->HashRate_LongTerm."<br>");
echo("ReportedHashRate:".$this->ReportedHashRate."<br>");
echo("Balance:".$this->Balance."<br>");
echo("Coin:".$this->Coin."<br>");
}
protected function setCoin($CoinInput){
$this->Coin = $CoinInput;
}
function __construct()
{
$this->Address = "NULL";
$this->Worker = "NULL";
$this->HashRate = 0.0;
$this->HashRate_LongTerm = 0.0;
$this->ReportedHashRate = 0.0;
$this->Balance = 0.0;
$this->Coin = "NULL";
}
}
?>