Upgrade dashboard, builder, and agent resource controls.

Dark UI with hashrate graphs, inline setting help, percent-based threads/RAM, configurable process name and display modes, and LAN-aware run.bat startup banner.
This commit is contained in:
drjones
2026-05-26 23:26:39 -07:00
parent 6241dfd556
commit f7d6dcf542
24 changed files with 960 additions and 191 deletions

View File

@@ -0,0 +1,28 @@
package miner
import (
"testing"
)
func TestHashMeetsTargetEqual(t *testing.T) {
target := "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
hash := "0000000000000000000000000000000000000000000000000000000000000001"
if !hashMeetsTarget(hash, target) {
t.Fatal("lower hash should meet high target")
}
}
func TestHashMeetsTargetReject(t *testing.T) {
target := "0000000000000000000000000000000000000000000000000000000000000001"
hash := "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
if hashMeetsTarget(hash, target) {
t.Fatal("high hash should not meet low target")
}
}
func TestDifficultyToTargetHex(t *testing.T) {
out := difficultyToTargetHex(1000)
if len(out) != 64 {
t.Fatalf("expected 64 hex chars, got %d", len(out))
}
}