Skip to content

Commit

Permalink
Migration to xtl miners
Browse files Browse the repository at this point in the history
  • Loading branch information
Donovan Solms committed May 28, 2018
1 parent 172752e commit 571adbf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/gui/miner/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
// CreateMiner creates a supported miner from the given configuration
func CreateMiner(config Config) (Miner, error) {
switch strings.ToLower(config.Type) {
case "xmr-stak":
case "xtl-stak":
return NewXmrStak(config)
case "xmrig":
case "xtlrig":
return NewXmrig(config)
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/miner/spec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package miner

// SupportedMiners contains a list of the currently supported miners
var SupportedMiners = []string{"xmr-stak", "xmrig"}
var SupportedMiners = []string{"xtl-stak", "xtlrig"}

// Config holds miner specific configuration information
type Config struct {
Expand Down
4 changes: 3 additions & 1 deletion src/gui/miner/xmr_stak.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ func NewXmrStak(config Config) (*XmrStak, error) {
}

miner := XmrStak{
name: "xmr-stak",
// We've switched to our own miner in V4, xtl-stak, but I'm keeping
// everything else xmr-stak for clarity
name: "xtl-stak",
endpoint: endpoint,
}
miner.Base.executableName = filepath.Base(config.Path)
Expand Down
8 changes: 5 additions & 3 deletions src/gui/miner/xmrig.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ func NewXmrig(config Config) (*Xmrig, error) {
}

miner := Xmrig{
name: "xmrig",
// We've switched to our own miner in V4, xtlrig, but I'm keeping
// everything else xmrig for clarity
name: "xtlrig",
endpoint: endpoint,
}
// xmrig appends either nvidia or amd to the miner if it's GPU only
Expand Down Expand Up @@ -322,7 +324,7 @@ func (miner *Xmrig) createConfig(
Colors: true,
CPUAffinity: nil,
CPUPriority: nil,
DonateLevel: 1,
DonateLevel: 2,
LogFile: nil,
MaxCPUUsage: processingConfig.MaxUsage,
PrintTime: 3600,
Expand Down Expand Up @@ -363,7 +365,7 @@ func (miner *Xmrig) createGPUConfig(
Colors: true,
CPUAffinity: nil,
CPUPriority: nil,
DonateLevel: 1,
DonateLevel: 2,
LogFile: nil,
PrintTime: 3600,
Retries: 5,
Expand Down
6 changes: 3 additions & 3 deletions src/resources/app/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,16 @@ let app = {
$('#max_threads_multiple').hide();
} else $('#max_threads_multiple').show();

if (parsed.type == 'xmrig') {
if (parsed.type == 'xtlrig') {
$('.xmrig-extra').show();
} else $('.xmrig-extra').hide();

// For xmrig's GPU only setup we don't show the CPU tuning options
if (parsed.type != "xmrig-gpu") {
if (parsed.type != "xtlrig-gpu") {
// TODO: Do this in a better way, i.e - not as text
var threadOptions = "<select>";
var startThreadCount = 1;
if (parsed.type == 'xmr-stak') {
if (parsed.type == 'xtl-stak') {
startThreadCount = 0;
}
for (var i = startThreadCount; i <= parsed.max_threads; i++) {
Expand Down

0 comments on commit 571adbf

Please sign in to comment.