go-p2p/node/errors.go
Snider 5ed4451555
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 1m31s
feat(ax): AX compliance sweep — comments as usage examples, remove linter-injected aliases
Applied AX principles 1, 2, and 9 across the node, dispatcher, transport, peer,
worker, bundle, and logging packages:

- Added usage-example comments to all public methods missing them (AX-2):
  dispatcher.RegisterHandler, Handlers; peer.AddPeer, UpdatePeer, RemovePeer,
  AllowPublicKey, RevokePublicKey, IsPublicKeyAllowed, IsPeerAllowed, RecordSuccess,
  RecordFailure, RecordTimeout, SelectOptimalPeer, SelectNearestPeers, Count,
  PeersByScore, AllowedPublicKeys, ListAllowedPublicKeys; transport.Start, Stop, Send,
  Connections, Broadcast, PeerConnection.Send, Close, GracefulClose
- Removed redundant inline comments that restate code (bundle.go, transport.go, worker.go)
- Added _Bad and _Ugly test categories to logging/logger_test.go to satisfy the
  TestFilename_Function_{Good,Bad,Ugly} naming convention (AX-10)
- Removed all linter-injected short-form alias files (*_compat.go, *_alias_test.go)
  that violated AX-1 (Err* aliases, Uint64Val, WithComponent, GetLevel, GetGlobal, etc.)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 12:20:52 +01:00

15 lines
544 B
Go

package node
import core "dappco.re/go/core"
// Shared error sentinels for the node package.
var (
// ErrorIdentityNotInitialized is returned when a node operation requires
// a node identity but none has been generated or loaded.
ErrorIdentityNotInitialized = core.E("node", "node identity not initialized", nil)
// ErrorMinerManagerNotConfigured is returned when a miner operation is
// attempted but no MinerManager has been set on the Worker.
ErrorMinerManagerNotConfigured = core.E("node", "miner manager not configured", nil)
)