mirror of
https://github.com/cryptonote-social/csminer.git
synced 2024-09-11 05:35:23 +03:00
bump minor version number and start working on next version changes such as full config string support
This commit is contained in:
parent
9018847be7
commit
4fe54118a3
17
csminer.go
17
csminer.go
@ -20,12 +20,15 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
saver = flag.Bool("saver", true, "run only when screen is locked")
|
||||
threads = flag.Int("threads", 1, "number of threads")
|
||||
uname = flag.String("user", DONATE_USERNAME, "your pool username from https://cryptonote.social/xmr")
|
||||
rigid = flag.String("rigid", "csminer", "your rig id")
|
||||
tls = flag.Bool("tls", false, "whether to use TLS when connecting to the pool")
|
||||
exclude = flag.String("exclude", "", "pause mining during these hours, e.g. -exclude=11-16 will pause mining between 11am and 4pm")
|
||||
saver = flag.Bool("saver", true, "run only when screen is locked")
|
||||
threads = flag.Int("threads", 1, "number of threads")
|
||||
uname = flag.String("user", DONATE_USERNAME, "your pool username from https://cryptonote.social/xmr")
|
||||
rigid = flag.String("rigid", "csminer", "your rig id")
|
||||
tls = flag.Bool("tls", false, "whether to use TLS when connecting to the pool")
|
||||
exclude = flag.String("exclude", "", "pause mining during these hours, e.g. -exclude=11-16 will pause mining between 11am and 4pm")
|
||||
config = flag.String("config", "", "advanced pool configuration options, e.g. start_diff=1000;donate=1.0")
|
||||
|
||||
// Deprecated:
|
||||
startDiff = flag.Int("start_diff", 0, "a starting difficulty value for the pool")
|
||||
)
|
||||
|
||||
@ -102,7 +105,7 @@ func MultiMain(s ScreenStater, agent string) {
|
||||
crylog.Info("Miner username:", *uname)
|
||||
crylog.Info("Threads:", *threads)
|
||||
|
||||
if Mine(s, *threads, *uname, *rigid, *saver, hr1, hr2, *startDiff, *tls, agent) != nil {
|
||||
if Mine(s, *threads, *uname, *rigid, *saver, hr1, hr2, *startDiff, *tls, *config, agent) != nil {
|
||||
crylog.Error("Miner failed:", err)
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
csminer v0.1.0 (Linux/Gnome version)
|
||||
csminer v0.1.1 (Linux/Gnome version)
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
@ -28,8 +28,10 @@ All arguments are optional:
|
||||
your rig id (default "csminer")
|
||||
-tls <bool>
|
||||
whether to use TLS when connecting to the pool (default false)
|
||||
-start_diff <int>
|
||||
starting difficulty value for the pool
|
||||
-config <string>
|
||||
advanced pool config option string, for specifying starting diff, donation percentage,
|
||||
email address for notifications, and more. See "advanced configuration options" under Get
|
||||
Started on the pool site for details.
|
||||
|
||||
Monitor your miner progress at: https://cryptonote.social/xmr, or type <p> + <enter> to display
|
||||
pool stats in the command shell.
|
||||
|
@ -21,7 +21,7 @@ type GnomeScreenStater struct {
|
||||
func (s GnomeScreenStater) GetScreenStateChannel() (chan csminer.ScreenState, error) {
|
||||
bus, err := dbus.ConnectSessionBus()
|
||||
if err != nil {
|
||||
crylog.Fatal("dbus connection failed")
|
||||
crylog.Error("dbus connection failed")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
10
miner.go
10
miner.go
@ -69,7 +69,7 @@ type ScreenStater interface {
|
||||
GetScreenStateChannel() (chan ScreenState, error)
|
||||
}
|
||||
|
||||
func Mine(s ScreenStater, threads int, uname, rigid string, saver bool, excludeHrStart int, excludeHrEnd int, startDiff int, useTLS bool, agent string) error {
|
||||
func Mine(s ScreenStater, threads int, uname, rigid string, saver bool, excludeHrStart int, excludeHrEnd int, startDiff int, useTLS bool, config string, agent string) error {
|
||||
if useTLS {
|
||||
cl = client.NewClient("cryptonote.social:5556", agent)
|
||||
} else {
|
||||
@ -106,11 +106,13 @@ func Mine(s ScreenStater, threads int, uname, rigid string, saver bool, excludeH
|
||||
clMutex.Unlock()
|
||||
sleepSec := 3 * time.Second
|
||||
for {
|
||||
sd := ""
|
||||
if startDiff > 0 {
|
||||
sd = "start_diff=" + strconv.Itoa(startDiff)
|
||||
if len(config) > 0 {
|
||||
config += ";"
|
||||
}
|
||||
config += "start_diff=" + strconv.Itoa(startDiff)
|
||||
}
|
||||
err := cl.Connect(uname, sd, rigid, useTLS)
|
||||
err := cl.Connect(uname, config, rigid, useTLS)
|
||||
if err != nil {
|
||||
crylog.Warn("Client failed to connect:", err)
|
||||
time.Sleep(sleepSec)
|
||||
|
@ -1,4 +1,4 @@
|
||||
csminer v0.1.0 (OSX version)
|
||||
csminer v0.1.1 (OSX version)
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
@ -27,10 +27,10 @@ All arguments are optional:
|
||||
number of threads (default 1)
|
||||
-rigid <string>
|
||||
your rig id (default "csminer")
|
||||
-tls <bool>
|
||||
whether to use TLS when connecting to the pool (default false)
|
||||
-start_diff <int>
|
||||
starting difficulty value for the pool
|
||||
-config <string>
|
||||
advanced pool config option string, for specifying starting diff, donation percentage,
|
||||
email address for notifications, and more. See "advanced configuration options" under Get
|
||||
Started on the pool site for details.
|
||||
|
||||
Monitor your miner progress at: https://cryptonote.social/xmr, or type <p> + <enter> to display
|
||||
pool stats in the command shell.
|
||||
|
@ -1,4 +1,4 @@
|
||||
csminer v0.1.0 (Windows version)
|
||||
csminer v0.1.1 (Windows version)
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
@ -28,8 +28,10 @@ All arguments are optional:
|
||||
your rig id (default "csminer")
|
||||
-tls <bool>
|
||||
whether to use TLS when connecting to the pool (default false)
|
||||
-start_diff <int>
|
||||
starting difficulty value for the pool
|
||||
-config <string>
|
||||
advanced pool config option string, for specifying starting diff, donation percentage,
|
||||
email address for notifications, and more. See "advanced configuration options" under Get
|
||||
Started on the pool site for details.
|
||||
|
||||
Monitor your miner progress at: https://cryptonote.social/xmr, or type <p> + <enter> to display
|
||||
pool stats in the command shell.
|
||||
|
Loading…
Reference in New Issue
Block a user