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:
AetherForge
2026-06-02 23:58:15 -07:00
parent f6b692e232
commit f0c4506e96
6 changed files with 523 additions and 83 deletions

View File

@@ -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...)