Mining/pkg/mining
snider 74bbf14de4 fix: Address networking, memory leak, and segfault issues from code review
Networking/Protocol fixes:
- Add HTTP server timeouts (Read/Write/Idle/ReadHeader) in service.go
- Fix CORS address parsing to use net.SplitHostPort safely
- Add request body size limit middleware (1MB max)
- Enforce MaxConns limit in WebSocket upgrade handler
- Fix WebSocket origin validation to only allow localhost
- Add read/write deadlines to WebSocket connections

Memory leak fixes:
- Add sync.Once to Manager.Stop() to prevent double-close panic
- Fix controller pending map leak by closing response channel
- Add memory reallocation for hashrate history slices when oversized
- Fix LogBuffer to truncate long lines and force reallocation on trim
- Add process wait timeout to prevent goroutine leaks on zombie processes
- Drain HTTP response body on copy error to allow connection reuse

Segfault/panic prevention:
- Add nil check in GetTotalHashrate for stats pointer
- Fix hashrate history slice reallocation to prevent capacity bloat

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 02:26:46 +00:00
..
component feat: Implement logging functionality for miners with log buffer and retrieval endpoint 2025-12-29 22:10:45 +00:00
component.go feat: Implement logging functionality for miners with log buffer and retrieval endpoint 2025-12-29 22:10:45 +00:00
config_manager.go fix: Complete race condition fixes and add config synchronization 2025-12-31 02:02:57 +00:00
dual_mining_test.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00
manager.go fix: Address networking, memory leak, and segfault issues from code review 2025-12-31 02:26:46 +00:00
manager_interface.go feat: Enhance mining configuration management and API documentation 2025-12-07 16:26:18 +00:00
manager_test.go feat: add _Good, _Bad, _Ugly tests 2025-11-13 21:24:25 +00:00
miner.go fix: Address networking, memory leak, and segfault issues from code review 2025-12-31 02:26:46 +00:00
mining.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00
mining_profile.go feat: Add setup wizard and profile management components with styling 2025-12-10 22:17:38 +00:00
mining_test.go adds miner-cli, a miner management and lifecycle tool 2025-11-09 01:02:31 +00:00
node_service.go fix: Address high severity security and reliability issues 2025-12-31 01:02:23 +00:00
profile_manager.go fix: Address critical security and concurrency issues 2025-12-31 00:50:06 +00:00
service.go fix: Address networking, memory leak, and segfault issues from code review 2025-12-31 02:26:46 +00:00
service_test.go fix: Complete race condition fixes and add config synchronization 2025-12-31 02:02:57 +00:00
settings_manager.go fix: Address critical security and concurrency issues 2025-12-31 00:50:06 +00:00
settings_manager_test.go feat: Add CPU throttling, settings manager, and multi-miner tests 2025-12-30 16:35:02 +00:00
syslog_unix.go windows build fix 2025-11-09 19:13:48 +00:00
syslog_windows.go windows build fix 2025-11-09 19:13:48 +00:00
throttle_test.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00
ttminer.go fix: Complete race condition fixes and add config synchronization 2025-12-31 02:02:57 +00:00
ttminer_start.go fix: Address networking, memory leak, and segfault issues from code review 2025-12-31 02:26:46 +00:00
ttminer_stats.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00
version.go adds miner-cli, a miner management and lifecycle tool 2025-11-09 01:02:31 +00:00
xmrig.go fix: Complete race condition fixes and add config synchronization 2025-12-31 02:02:57 +00:00
xmrig_gpu_test.go feat: Add OpenCL GPU support for ProgPowZ, ETChash, and Blake3DCR 2025-12-30 23:01:16 +00:00
xmrig_start.go fix: Address networking, memory leak, and segfault issues from code review 2025-12-31 02:26:46 +00:00
xmrig_stats.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00
xmrig_test.go fix: Address race conditions and network blocking issues 2025-12-31 01:55:24 +00:00