Skip to content

Commit

Permalink
add support LTC payout on zergpool
Browse files Browse the repository at this point in the history
  • Loading branch information
Quake4 committed Apr 5, 2018
1 parent 5f71c4a commit 03a51cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Code/Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Config : BaseConfig {
static [int] $Processors = 0
static [int] $Cores = 0
static [int] $Threads = 0
static [string] $Version = "v1.41"
static [string] $Version = "v1.42"
static [string] $BinLocation = "Bin"
static [eMinerType[]] $ActiveTypes
static [string[]] $CPUFeatures
Expand Down Expand Up @@ -103,7 +103,7 @@ class Config : BaseConfig {
# validate readed config file
[string] Validate() {
$result = [Collections.ArrayList]::new()
if ([string]::IsNullOrWhiteSpace($this.Wallet) -or [string]::IsNullOrWhiteSpace($this.Wallet.BTC)) {
if ([string]::IsNullOrWhiteSpace($this.Wallet) -or ([string]::IsNullOrWhiteSpace($this.Wallet.BTC) -and [string]::IsNullOrWhiteSpace($this.Wallet.LTC))) {
$result.Add("Wallet.BTC")
}
if ([string]::IsNullOrWhiteSpace($this.WorkerName)) {
Expand Down
15 changes: 9 additions & 6 deletions Pools/ZergPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ $Cfg = ReadOrCreateConfig "Do you want to mine on $($PoolInfo.Name) (>0.008 BTC
SpecifiedCoins = $null
}
if (!$Cfg) { return $PoolInfo }
if (!$Config.Wallet.BTC) { return $PoolInfo }
if (!$Config.Wallet.BTC -and !$Config.Wallet.LTC) { return $PoolInfo }

$Wallet = if ($Config.Wallet.BTC) { $Config.Wallet.BTC } else { $Config.Wallet.LTC }
$Sign = if ($Config.Wallet.BTC) { "BTC" } else { "LTC" }

$PoolInfo.Enabled = $Cfg.Enabled
$PoolInfo.AverageProfit = $Cfg.AverageProfit
Expand All @@ -42,7 +45,7 @@ try {
catch { return $PoolInfo }

try {
if ($Config.ShowBalance) {
if ($Config.ShowBalance -and $Config.Wallet.BTC) {
$RequestBalance = Get-UrlAsJson "http://api.zergpool.com:8080/api/wallet?address=$($Config.Wallet.BTC)"
}
}
Expand Down Expand Up @@ -128,8 +131,8 @@ $RequestStatus | Get-Member -MemberType NoteProperty | Select-Object -ExpandProp
Host = $Pool_Host
Port = $Pool_Port
PortUnsecure = $Pool_Port
User = $Config.Wallet.BTC
Password = "c=BTC,mc=$($_.Coin),$($Config.WorkerName)" # "c=$($MaxCoin.Coin),$($Config.WorkerName)";
User = $Wallet
Password = "c=$Sign,mc=$($_.Coin),$($Config.WorkerName)" # "c=$($MaxCoin.Coin),$($Config.WorkerName)";
})
}
}
Expand All @@ -155,8 +158,8 @@ $RequestStatus | Get-Member -MemberType NoteProperty | Select-Object -ExpandProp
Host = $Pool_Host
Port = $Pool_Port
PortUnsecure = $Pool_Port
User = $Config.Wallet.BTC
Password = "c=BTC,$($Config.WorkerName)" # "c=$($MaxCoin.Coin),$($Config.WorkerName)";
User = $Wallet
Password = "c=$Sign,$($Config.WorkerName)" # "c=$($MaxCoin.Coin),$($Config.WorkerName)";
})
}
}
Expand Down

0 comments on commit 03a51cb

Please sign in to comment.