Files
consensus/engine/common/common.go
T
zeekay 4aac78700d Refactor: remove dead code, add thread safety, improve test coverage
- Remove unused packages: engine/dag/{getter,bootstrap,vertex/vertexmock},
  engine/pq/{bootstrap,block}, core/{tracker,verify}
- Add sync.RWMutex to protocol/wave for thread-safe map access
- Increase engine/dag test coverage from 11.7% to 98.3%
- Add comprehensive tests for DAG consensus, vertex, and engine
- All 27 packages pass tests, 16 at 100% coverage
2025-12-13 07:42:01 +00:00

21 lines
438 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package common
import "fmt"
// AppError is a structured error type for application-level errors
type AppError struct {
Code int32
Message string
}
// Error implements the error interface
func (e *AppError) Error() string {
if e == nil {
return ""
}
return fmt.Sprintf("app error %d: %s", e.Code, e.Message)
}