support for -dev flag

This commit is contained in:
cryptonote-social 2021-01-04 09:28:39 -08:00
parent 13f698be07
commit de9ed276fb
2 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@ var (
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")
wallet = flag.String("wallet", "", "your wallet id. only specify this when establishing a new username, or specifying a 'secure' config change such as a change in donation amount")
dev = flag.Bool("dev", false, "whether to connect to dev server")
)
func MultiMain(s MachineStater, agent string) {
@ -127,6 +128,7 @@ func MultiMain(s MachineStater, agent string) {
ExcludeHrEnd: hr2,
UseTLS: *tls,
AdvancedConfig: *config,
Dev: *dev,
}
if err = Mine(&config); err != nil {
crylog.Fatal("Miner failed:", err)

View File

@ -69,6 +69,9 @@ func Mine(c *MinerConfig) error {
sleepSec := 3 * time.Second // time to sleep if connection attempt fails
for {
if c.Dev {
crylog.Warn("\n\n=================\n\nCONNECTING TO DEV SERVER -- THIS IS FOR TESTING ONLY\n\n=================\n\n")
}
plResp := minerlib.PoolLogin(&minerlib.PoolLoginArgs{
Username: c.Username,
RigID: c.RigID,