Skip to content

Commit

Permalink
removed the unnecessary switch between miners
Browse files Browse the repository at this point in the history
Самсонов Олег authored and Самсонов Олег committed Jan 2, 2018
1 parent 60cd8c5 commit a6a8915
Showing 25 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Code/Config.ps1
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ class Config : BaseConfig {
static [int] $Processors = 0
static [int] $Cores = 0
static [int] $Threads = 0
static [string] $Version = "v0.20"
static [string] $Version = "v0.21"
static [string] $BinLocation = "Bin"
static [eMinerType[]] $ActiveTypes
static [string[]] $CPUFeatures
4 changes: 2 additions & 2 deletions Code/MinerInfo.ps1
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ class MinerInfo {
[string] $Arguments
[int] $Port
[string] $Pool
[string] $PoolKey
[int] $BenchmarkSeconds
[decimal] $Fee

@@ -33,7 +34,6 @@ class MinerInfo {
return (Test-Path ([IO.Path]::Combine($parent, $this.Path)))
}


[string] GetCommandLine() {
return "$($this.Path) $($this.Arguments)"
}
@@ -62,7 +62,7 @@ class MinerInfo {

[string] GetUniqueKey() {
if (!$this.UniqueKey) {
$this.UniqueKey = "$($this.GetFilename())_$($this.GetKey())_$($this.Pool)_$($this.Arguments)"
$this.UniqueKey = "$($this.GetFilename())_$($this.GetKey())_$($this.PoolKey)_$($this.Arguments)"
}
return $this.UniqueKey
}
10 changes: 10 additions & 0 deletions Code/PoolInfo.ps1
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ class PoolInfo {
class PoolAlgorithmInfo {
[string] $Name
[string] $Info
[bool] $InfoAsKey
[string] $Algorithm
[decimal] $Profit
[string] $Protocol
@@ -49,6 +50,15 @@ class PoolAlgorithmInfo {
}
}

[string] PoolKey() {
if ($this.InfoAsKey -and $this.Info) {
return "$($this.Name)-$($this.Info)"
}
else {
return $this.Name
}
}

[string] ToString() {
return $this | Select-Object Name, Info, Algorithm, Profit, Protocol, Host, Port, PortUnsecure, User, Password
}
1 change: 1 addition & 0 deletions Miners/EWBF-034.ps1
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-alexis-01.ps1
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-djm34-021.ps1
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-klaust-817.ps1
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-klaust-cn-206.ps1
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ if ($Algo) {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-krnlx-xevan-01.ps1
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-nanashi-mr2.ps1
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-tpruvot-223.ps1
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/ccminer-x11gost-1.ps1
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/claymore-cn-110.ps1
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@ $Cfg.Algorithms | ForEach-Object {
}
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/claymore-cn-97.ps1
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ $Cfg.Algorithms | ForEach-Object {
}
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/claymore-zcash-126.ps1
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@ $Cfg.Algorithms | ForEach-Object {
}
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
3 changes: 3 additions & 0 deletions Miners/cpuminer-opt-378.ps1
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
@@ -101,6 +102,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($bestminer -eq "cpuminer-aes-avx2.exe") {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
@@ -116,6 +118,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($bestminer -eq "cpuminer-avx-sha.exe") {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
1 change: 1 addition & 0 deletions Miners/cpuminer-plys-100.ps1
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
1 change: 1 addition & 0 deletions Miners/ggate-0136.ps1
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
2 changes: 2 additions & 0 deletions Miners/nheqminer-05c.ps1
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ $Cfg.Algorithms | ForEach-Object {
for ([int] $i = [Config]::Processors; $i -le [Config]::Threads; $i++) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
@@ -48,6 +49,7 @@ $Cfg.Algorithms | ForEach-Object {
# nVidia
<#[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::nVidia
1 change: 1 addition & 0 deletions Miners/sgminer-djm34-02.ps1
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/sgminer-mph-skein-531.ps1
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/sgminer-nicehash-561.ps1
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/sgminer-xevan-1.ps1
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ $Cfg.Algorithms | ForEach-Object {
if ($Pool) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::AMD
1 change: 1 addition & 0 deletions Miners/xmr-stak-cpu-150.ps1
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ if (![Config]::Is64Bit) { exit }
function Get-XMRStak([Parameter(Mandatory = $true)][string] $filename) {
[MinerInfo]@{
Pool = $Pool.PoolName()
PoolKey = $Pool.PoolKey()
Name = $Name
Algorithm = $Algo
Type = [eMinerType]::CPU
1 change: 1 addition & 0 deletions Pools/MPH.ps1
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ $Pool_Regions | ForEach-Object {
Name = $PoolInfo.Name
Algorithm = $Pool_Algorithm
Info = "$Miner_Region-$Coin"
InfoAsKey = $true
Profit = $Profit
Protocol = $Pool_Protocol
Host = $Pool_Host

0 comments on commit a6a8915

Please sign in to comment.