Skip to content

Commit

Permalink
fixed wong conversion x to decimal #597
Browse files Browse the repository at this point in the history
  • Loading branch information
Quake4 committed Jan 23, 2020
1 parent 0db0e25 commit 45884e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Pools/MRR.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ $AlgosRequest.data | ForEach-Object {
Port = $server.port
PortUnsecure = $server.port
User = $Algo.name
Password = $percent
Password = "x"
Priority = [Priority]::None
Extra = @{ "price" = $Price; "totalhash" = $rented + $avail }
Extra = @{ "price" = $Price; "totalhash" = $rented + $avail; "rentpercent" = $percent }
}
}
}
Expand Down Expand Up @@ -367,8 +367,8 @@ try {
$Speed = (($KnownAlgos.Values | ForEach-Object { $t = $_[$Algo.Algorithm]; if ($t) { $t } }) | Measure-Object Speed -Sum).Sum
$Profit = $Speed * $Algo.Extra["price"]
$hashpercent = if ($Algo.Extra["totalhash"] -gt 0) { "($([decimal]::Round($SpeedAdv * 100 / ($Algo.Extra["totalhash"] - $SpeedAdv), 2))%) " } else { [string]::Empty }
if ($Algo.Profit -eq 0 -and $Profit -gt 0<#-and [decimal]$Algo.Password -gt 0#>) {
Write-Host "MRR: $($Algo.Algorithm) ($(Get-Join ", " $KnownTypes)), speed: $hashpercent$([MultipleUnit]::ToString($Speed) -replace `" `")H/s, profit: $([decimal]::Round($Profit, 8)), rented: $("{0:N1}" -f [decimal]$_.Password)% - $($Algo.Info)"
if ($Algo.Profit -eq 0 -and $Profit -gt 0<#-and $Algo.Extra["rentpercent"] -gt 0#>) {
Write-Host "MRR: $($Algo.Algorithm) ($(Get-Join ", " $KnownTypes)), speed: $hashpercent$([MultipleUnit]::ToString($Speed) -replace `" `")H/s, profit: $([decimal]::Round($Profit, 8)), rented: $("{0:N1}" -f $Algo.Extra["rentpercent"])% - $($Algo.Info)"
if ($global:HasConfirm -and !$global:HasBenchmark) {
if (Get-Question "Add rig to MRR for algorithm '$($Algo.Algorithm)'") {
$prms = @{
Expand Down

0 comments on commit 45884e9

Please sign in to comment.