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:
24
agent/config/adapt_test.go
Normal file
24
agent/config/adapt_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user