Commit graph

5 commits

Author SHA1 Message Date
Virgil
243749a6d8 refactor: align command paths with AX naming
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
2026-04-04 04:10:23 +00:00
Snider
34128d8e98 refactor: migrate module path to dappco.re/go/core/blockchain
Some checks failed
Security Scan / security (pull_request) Successful in 11s
Test / Test (pull_request) Failing after 19s
Update go.mod module line, all require/replace directives, and every
.go import path from forge.lthn.ai/core/go-blockchain to
dappco.re/go/core/blockchain. Add replace directives to bridge
dappco.re paths to existing forge.lthn.ai registry during migration.
Update CLAUDE.md, README, and docs to reflect the new module path.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:49:26 +00:00
Snider
71f0a5c1d5 refactor: replace fmt.Errorf/os.* with go-io/go-log conventions
Some checks failed
Security Scan / security (push) Successful in 11s
Test / Test (push) Failing after 23s
Replace all fmt.Errorf and errors.New in production code with
coreerr.E("Caller.Method", "message", err) from go-log. Replace
os.MkdirAll with coreio.Local.EnsureDir from go-io. Sentinel errors
(consensus/errors.go, wire/varint.go) intentionally kept as errors.New
for errors.Is compatibility.

270 error call sites converted across 38 files. Test files untouched.
crypto/ directory (CGO) untouched.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 21:17:49 +00:00
Snider
9bc33e2860 fix: code review fixes — log.Fatalf, goroutine lifecycle, stale doc
- Replace log.Fatalf with fmt.Errorf in explorer store open (proper error return)
- Add WaitGroup for syncLoop goroutine in runExplorer (same pattern as daemon)
- Fix stale doc comment mentioning 'mine' subcommand

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 16:27:21 +00:00
Snider
aa3d8270a2 feat: modernise CLI — AddChainCommands, explorer/sync subcommands, core-chain binary
Migrate from stdlib flag to cli.Main() + WithCommands() pattern:
- AddChainCommands() registration with persistent --data-dir/--seed/--testnet flags
- Explorer subcommand (TUI block explorer, replaces old default mode)
- Sync subcommand with headless foreground and --daemon/--stop modes
- sync_service.go extracts syncLoop/syncOnce from old main.go
- cmd/core-chain/main.go standalone binary entry point
- Add go-process dependency for daemon lifecycle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 16:21:42 +00:00