ax(mining): replace prose comments with usage examples in simulated_miner.go
AX principle 2 — comments must show HOW (concrete call), not restate WHAT the name already says. Three prose-style descriptions replaced with realistic usage examples showing struct construction and registration. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
09f6f12f08
commit
7b098da3be
1 changed files with 3 additions and 3 deletions
|
|
@ -9,10 +9,10 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// MinerTypeSimulated is the type identifier for simulated miners.
|
||||
// factory.Register(MinerTypeSimulated, func() Miner { return NewSimulatedMiner(SimulatedMinerConfig{}) })
|
||||
const MinerTypeSimulated = "simulated"
|
||||
|
||||
// SimulatedMiner is a mock miner that generates realistic-looking stats for UI testing.
|
||||
// miner := &SimulatedMiner{Name: "sim-001", MinerType: MinerTypeSimulated, Algorithm: "rx/0"}
|
||||
type SimulatedMiner struct {
|
||||
// Exported fields for JSON serialization
|
||||
Name string `json:"name"`
|
||||
|
|
@ -42,7 +42,7 @@ type SimulatedMiner struct {
|
|||
difficultyBase int
|
||||
}
|
||||
|
||||
// SimulatedMinerConfig holds configuration for creating a simulated miner.
|
||||
// SimulatedMinerConfig{Name: "sim-001", Algorithm: "rx/0", BaseHashrate: 5000, Variance: 0.1}
|
||||
type SimulatedMinerConfig struct {
|
||||
Name string // Miner instance name (e.g., "sim-xmrig-001")
|
||||
Algorithm string // Algorithm name (e.g., "rx/0", "kawpow", "ethash")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue