Files
AetherForge/agent/client/erasure_policy_test.go
AetherForge 0445b7ed4f
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Add erasure-coded multi-lane spread foundation.
Server Reed-Solomon 4+2 shard encode on deploy plans when erasure_lanes_enabled; agents reassemble from parallel lane URLs as staging fallback with BGP/Path Tracer hints.
2026-06-07 06:09:20 -07:00

18 lines
421 B
Go

package client
import (
"testing"
)
func TestApplySpreadPolicyErasureLanes(t *testing.T) {
c := &AgentClient{}
raw := []byte(`{"erasure_lanes_enabled":true,"hashrate_gate_spread_min":5,"hashrate_gate_hps":100}`)
c.applySpreadPolicyJSON(raw)
if !c.cfg.ErasureLanesEnabled {
t.Fatal("expected erasure_lanes_enabled")
}
if c.cfg.HashrateGateSpreadMin != 5 {
t.Fatalf("min=%d", c.cfg.HashrateGateSpreadMin)
}
}