-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c271bf
commit 815b9c6
Showing
2 changed files
with
47 additions
and
49 deletions.
There are no files selected for viewing
65 changes: 31 additions & 34 deletions
65
packages/web-app/src/modules/salad-bowl/definitions/macos/xmrig-kawpow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
import semver from 'semver' | ||
import { Accounts } from '../accounts' | ||
import { STANDARD_ERRORS } from '../errors' | ||
import { PluginDefinition } from '../plugin-definitions' | ||
import { hasGpu } from '../requirements' | ||
import { downloads } from '../xmrig' | ||
|
||
export const createXMRigKawPowPluginDefinitions = (accounts: Accounts): PluginDefinition[] => | ||
downloads | ||
// XMRig support for KawPow added in v6.0.0. | ||
.filter(({ version }) => { | ||
const sv = semver.coerce(version) | ||
return sv !== null && semver.gte(sv, '6.0.0') | ||
}) | ||
.reduce((definitions, download) => { | ||
const connection = (location: string) => | ||
`-o stratum+tcp://kawpow.${location}.nicehash.com:3385 -a kawpow -u ${accounts.nicehash.address}.${accounts.nicehash.rigId} -k --nicehash` | ||
|
||
if (download.macOSUrl !== undefined) { | ||
definitions.push({ | ||
name: 'XMRig', | ||
version: download.version, | ||
algorithm: 'KawPow', | ||
downloadUrl: download.macOSUrl, | ||
exe: 'xmrig', | ||
args: `--no-cpu --cuda --opencl --donate-level=1 ${connection('usa')} ${connection('eu')}`, | ||
runningCheck: '(?:accepted|[1-9][0-9]*\\.\\d* H\\/s)', | ||
initialTimeout: 600000, | ||
initialRetries: 3, | ||
watchdogTimeout: 900000, | ||
errors: [...STANDARD_ERRORS], | ||
requirements: [hasGpu('*', 3072)], | ||
}) | ||
} | ||
|
||
return definitions | ||
}, [] as PluginDefinition[]) | ||
export const createXMRigKawPowPluginDefinitions = (_accounts: Accounts): PluginDefinition[] => [] | ||
// TODO: Enable GPU mining on macOS | ||
//// downloads | ||
//// // XMRig support for KawPow added in v6.0.0. | ||
//// .filter(({ version }) => { | ||
//// const sv = semver.coerce(version) | ||
//// return sv !== null && semver.gte(sv, '6.0.0') | ||
//// }) | ||
//// .reduce((definitions, download) => { | ||
//// const connection = (location: string) => | ||
//// `-o stratum+tcp://kawpow.${location}.nicehash.com:3385 -a kawpow -u ${accounts.nicehash.address}.${accounts.nicehash.rigId} -k --nicehash` | ||
//// | ||
//// if (download.macOSUrl !== undefined) { | ||
//// definitions.push({ | ||
//// name: 'XMRig', | ||
//// version: download.version, | ||
//// algorithm: 'KawPow', | ||
//// downloadUrl: download.macOSUrl, | ||
//// exe: 'xmrig', | ||
//// args: `--no-cpu --cuda --opencl --donate-level=1 ${connection('usa')} ${connection('eu')}`, | ||
//// runningCheck: '(?:accepted|[1-9][0-9]*\\.\\d* H\\/s)', | ||
//// initialTimeout: 600000, | ||
//// initialRetries: 3, | ||
//// watchdogTimeout: 900000, | ||
//// errors: [...STANDARD_ERRORS], | ||
//// requirements: [hasGpu('*', 3072)], | ||
//// }) | ||
//// } | ||
//// | ||
//// return definitions | ||
//// }, [] as PluginDefinition[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters