Skip to content

Commit

Permalink
5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tutulino committed Dec 23, 2017
1 parent 2fbd19d commit a40cf95
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

@@PERCENTTOSWITCH=10

-- seconds to delay closing of old miners when new miner is selected as more profitable, this minimizes inactive time while switch.
-- seconds to delay closing of old miners when new miner is selected as more profitable, this minimizes inactive time while switch. For benchmarking interval this value is automatically zero.

@@DELAYCLOSEMINERS=20

Expand Down
5 changes: 3 additions & 2 deletions Include.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,8 @@ function Get-Pools {

$PoolsFolderContent | ForEach-Object {

$SharedFile=$PSScriptRoot+"\"+$_.BaseName+[string](Get-Random -minimum 0 -maximum 9999999)+".tmp"
$Basename=$_.BaseName
$SharedFile=$PSScriptRoot+"\"+$Basename+[string](Get-Random -minimum 0 -maximum 9999999)+".tmp"
$info.SharedFile=$SharedFile

if (Test-Path $SharedFile) {Remove-Item $SharedFile}
Expand All @@ -889,7 +890,7 @@ function Get-Pools {
}
else
{$Content=$null}
$Content | ForEach-Object {$ChildItems +=[PSCustomObject]@{Name = $Name; Content = $_}}
$Content | ForEach-Object {$ChildItems +=[PSCustomObject]@{Name = $Basename; Content = $_}}
}

$AllPools = $ChildItems | ForEach-Object {if ($_.content -ne $null) {$_.Content | Add-Member @{Name = $_.Name} -PassThru}}
Expand Down
6 changes: 3 additions & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,12 @@ TO FORCE UPGRADE OF MINERS YOU MUST DELETE MINER FOLDER (CONTAINED ON BIN FOLDER


*Added new config.txt parameter @@PERCENTTOSWITCH for indicates MM new miner/algo only will be launched if new profit is greater than actual profit in specified percent, also defined PERCENTTOSWITCH parameter to override config.txt value (for example for not PPLS pools like Nicehash)
*Now miners are closed N seconds after new miners are opened, this minimize time machine is inactive for switching. Time is configured on config.txt @@TIMETOSWITCH variable
*Included Bminer for Nvidia equihash
*Added confirmation prompt to ResetBechmark batch
*Excavator moved to additional miners folder due to instability
*Reactivated Nicehash pool
*Included Bminer for Nvidia equihash
*Now miners are closed N seconds after new miners are opened, this minimize time machine is inactive for switching. Time is configured on config.txt @@TIMETOSWITCH variable

*Upgraded compatibility for more than one instance of MM running


*Fixed: incorrect workername for dualmining
Expand Down
14 changes: 7 additions & 7 deletions core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ while ($true) {


if ($PercentToSwitch -eq "") {$PercentToSwitch2 = [int](get-config-variable "PERCENTTOSWITCH")} else {$PercentToSwitch2=[int]$PercentToSwitch}

$DelayCloseMiners=get-config-variable "DELAYCLOSEMINERS"

$Types=Get-Mining-Types -filter $Groupnames

Expand Down Expand Up @@ -199,13 +199,11 @@ while ($true) {
$WorkerName = "Megaminer"
$CoinsWallets=@{}
$CoinsWallets.add("BTC","1AVMHnFgc6SW33cwqrDyy2Fug9CsS8u6TM")



$NextInterval=$DonateTime *60

$Algorithm=$null
$PoolsName="mining_pool_hub"
$PoolsName="nicehash"
$CoinsName=$null
$MiningMode="Automatic"

Expand Down Expand Up @@ -608,7 +606,7 @@ while ($true) {
#Start all Miners marked as Best (if they are running does nothing)
$ActiveMiners | Where-Object Best -eq $true | ForEach-Object {

if ($_.NeedBenchmark) {$NextInterval=$BechmarkintervalTime} #if one need benchmark next interval will be short
if ($_.NeedBenchmark) {$NextInterval=$BechmarkintervalTime;$DelayCloseMiners=0} #if one need benchmark next interval will be short and fast change

#Launch
if ($_.Process -eq $null -or $_.Process.HasExited -ne $false) {
Expand Down Expand Up @@ -697,8 +695,10 @@ while ($true) {

#Stop miners running if they arent best now or failed after 30 seconds into loop


if ($LoopSeconds -gt (get-config-variable "DELAYCLOSEMINERS") -and $MustCloseMiners) {



if ($LoopSeconds -ge $DelayCloseMiners -and $MustCloseMiners) {
$AnyProcClosed=$false
$ActiveMiners | Where-Object {$_.Best -eq $false -and $_.Process -ne $null} | ForEach-Object {

Expand Down

0 comments on commit a40cf95

Please sign in to comment.