forked from lkm543/BackupMining
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generalPool.php
52 lines (45 loc) · 1.21 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
47
48
49
50
51
52
<?php
abstract class generalPool
{
public $Address;
public $Worker;
public $HashRate;
public $HashRate_LongTerm;
public $ReportedHashRate;
public $Balance;
public $Coin;
//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";
}
}
?>