feat(gpu): fix shutdown race, add RVN pool rotation, full test suite. Fix run() deadlock: proc.Kill() on Stop(), dedicated pollStop channel, stopCh checked in retry delay. Add buildPoolList() using RVNBackupPools (was wired in config/UI but unused). 29 new GPU tests covering detection gates, pool URL building, pool rotation, avg(), itoa(), zip extract, mock miner API (T-Rex + TRM), process stop. RVN wallet defaults set. Download URLs verified 200.
This commit is contained in:
@@ -23,25 +23,20 @@ func detectGPU() GPUInfo {
|
||||
return GPUInfo{Vendor: GPUVendorNone}
|
||||
}
|
||||
|
||||
func (g *GPUMiner) startProcess(binPath string) (*os.Process, error) {
|
||||
pool := g.cfg.RVNPoolHost
|
||||
port := g.cfg.RVNPoolPort
|
||||
func (g *GPUMiner) startProcessOnPool(binPath string, ep rvnEndpoint) (*os.Process, error) {
|
||||
wallet := g.cfg.RVNWallet
|
||||
worker := g.cfg.WorkerName
|
||||
|
||||
poolURL := "stratum+tcp://" + pool
|
||||
if g.cfg.RVNPoolTLS {
|
||||
poolURL = "stratum+ssl://" + pool
|
||||
}
|
||||
if port > 0 {
|
||||
poolURL += ":" + itoa(port)
|
||||
poolURL := buildPoolURL(ep)
|
||||
pass := ep.pass
|
||||
if pass == "" {
|
||||
pass = "x"
|
||||
}
|
||||
|
||||
args := []string{
|
||||
"-a", "kawpow",
|
||||
"-o", poolURL,
|
||||
"-u", wallet + "." + worker,
|
||||
"-p", g.cfg.RVNPoolPass,
|
||||
"-p", pass,
|
||||
"--api-bind-http", "127.0.0.1:4067",
|
||||
}
|
||||
cmd := exec.Command(binPath, args...)
|
||||
|
||||
Reference in New Issue
Block a user