Skip to content
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
3798bb8
Enable support for viewing peer registry details
galt-tr Oct 16, 2025
f7bd1cb
Small fixes
galt-tr Oct 17, 2025
0ed2490
Add ban manager to registry
galt-tr Oct 21, 2025
a2d816e
Refactor blockvalidation catchup to use the peer registry
galt-tr Oct 22, 2025
a144ee8
Add caching
galt-tr Oct 22, 2025
4bcd032
Refactor a bit
galt-tr Oct 22, 2025
172c4f8
Add subtree stuff
galt-tr Oct 23, 2025
bf5ca17
Fix peer ID mapping
galt-tr Oct 23, 2025
aec56db
Fix gen
galt-tr Oct 23, 2025
be4a23b
Turn off subtree reputation
galt-tr Oct 23, 2025
a38866e
Add catchup indicator
galt-tr Oct 23, 2025
0897929
Finish rebase
galt-tr Oct 27, 2025
8f6a20f
Move to constant peer IDs
galt-tr Oct 28, 2025
9d5fcae
Stable peers
galt-tr Oct 28, 2025
c5bc30a
Fix reputation system
galt-tr Oct 29, 2025
51d3d83
Properly catch sync failures
galt-tr Oct 29, 2025
e425d33
Updates
galt-tr Oct 29, 2025
af393aa
Fix table
galt-tr Oct 29, 2025
e5f422a
Fix catchup logic
galt-tr Oct 29, 2025
2706653
Change log
galt-tr Oct 29, 2025
019e679
Fix lint errors
galt-tr Oct 30, 2025
7909858
Fix format
galt-tr Oct 30, 2025
6db4722
Fix p2p tests
galt-tr Oct 30, 2025
692d95a
Fix get blocks test
galt-tr Oct 30, 2025
2f396ea
Don't reset success counter
galt-tr Oct 30, 2025
aa24b18
Move peer registry endpoint to asset service
galt-tr Oct 30, 2025
c0699f7
Fix URL construction
galt-tr Oct 30, 2025
bf2567a
Add positive reputation for subtrees
galt-tr Oct 30, 2025
3f80586
Fix peers page for container deployments
oskarszoon Oct 30, 2025
5598961
Fix catchup status for compiled svelte
oskarszoon Oct 30, 2025
33e52f8
Prevent secret mining check from triggering during catchup
oskarszoon Oct 31, 2025
3445afb
Improve catchup state block
oskarszoon Oct 31, 2025
de8c821
Switch asset to use hardened grpc connections to p2p and blockvalidation
oskarszoon Oct 31, 2025
047da04
Implement client name
galt-tr Oct 31, 2025
f635dff
Change some rendering for catchup
galt-tr Oct 31, 2025
4a9d27c
Rename
galt-tr Oct 31, 2025
1eb4e5d
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Oct 31, 2025
50c305f
Add tsts
galt-tr Nov 3, 2025
68b508b
Fix linters
galt-tr Nov 3, 2025
5e19bb5
Fix tests
galt-tr Nov 3, 2025
116d6eb
Fix another test
galt-tr Nov 3, 2025
6a14fbd
Address feedback
galt-tr Nov 3, 2025
a619618
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 3, 2025
f6c1bf3
Remove temporary doc, will be integrated into main docs seperately
oskarszoon Nov 3, 2025
3778014
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 3, 2025
f6602c7
make gen with latest protoc
oskarszoon Nov 3, 2025
bb76a1d
Fix file naming for new files
oskarszoon Nov 3, 2025
e137f00
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 3, 2025
ebf8e22
Prevent local issues being reported as peer issue
oskarszoon Nov 3, 2025
48ff56b
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 3, 2025
bd3960d
Fix race test
galt-tr Nov 3, 2025
34e7f01
Fix claude feedback
galt-tr Nov 3, 2025
50e3c57
Made creation of p2p client a singleton
icellan Nov 3, 2025
3f8cd74
Cleaned up peer_selection
icellan Nov 3, 2025
28bb439
Add locking around difficulty setting
oskarszoon Nov 3, 2025
7d4e017
Merge branch 'main' into peerRegistryViewer
galt-tr Nov 4, 2025
235e034
Add another test
galt-tr Nov 4, 2025
aa41978
Fix regex for test
galt-tr Nov 4, 2025
374c6d1
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
7825fd6
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
73b5d15
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
fa7284b
Update go-subtree to latest with reduced buffer sizes
oskarszoon Nov 4, 2025
74ec593
SubtreeMeta/SubtreeNode/SubtreeData was renamed in go-subtree package
oskarszoon Nov 4, 2025
c7434a9
Fix lint
oskarszoon Nov 4, 2025
f65a1c1
Remove P2P Health mechanism in favor of using only reputation
oskarszoon Nov 4, 2025
347fd44
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
52f721b
Fix lint
oskarszoon Nov 4, 2025
a9def97
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
d6e820b
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 4, 2025
f9c87f2
Merge branch 'main' into peerRegistryViewer
galt-tr Nov 5, 2025
57b7c79
Error return for catchup
galt-tr Nov 5, 2025
5d56152
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 5, 2025
461ed92
Merge branch 'main' into peerRegistryViewer
galt-tr Nov 5, 2025
225e7a7
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 6, 2025
865e541
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 6, 2025
f1863f4
Cleanup and updates on interfaces and code conventions
icellan Nov 6, 2025
cd4e972
Refactored peerID and baseURL to be passed into functions in the same…
icellan Nov 7, 2025
2c34d3d
Merge branch 'main' into peerRegistryViewer
icellan Nov 7, 2025
41d32ca
Cleanup and updates on interfaces and code conventions
icellan Nov 6, 2025
04edee7
Refactored peerID and baseURL to be passed into functions in the same…
icellan Nov 7, 2025
7065104
Merge branch 'dylan/peerRegistryViewer' of github.com:icellan/teranod…
icellan Nov 7, 2025
436aac5
Fixed order of peerID and baseURL in mock
icellan Nov 7, 2025
ad3c247
Fixed passing in p2pClient to asset repository
icellan Nov 7, 2025
2447097
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 7, 2025
4569e54
Merge branch 'main' of https://github.com/bsv-blockchain/teranode int…
oskarszoon Nov 10, 2025
63ecf51
Advertise as a full node in legacy service when we have the persister
oskarszoon Nov 10, 2025
5fa2002
Decrease validation/catchup buffers and channel to improve catchup re…
oskarszoon Nov 10, 2025
a1687d3
More catchup improvements
oskarszoon Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,53 @@ The project includes a Bitcoin expert agent (`.claude/agents/bitcoin-expert.md`)
- Don't use mock blockchain client/store - you can use a real one using the sqlitememory store
- Don't use mock kafka - you can use in_memory_kafka.go

### Service Interface Design Pattern

When creating or updating service interfaces and clients, follow this pattern to avoid exposing protobuf/gRPC types:

**Interface Layer** (`Interface.go`):
- Define interfaces using native Go types and existing domain types (e.g., `*PeerInfo`, `[]string`, `bool`, `error`)
- Do NOT expose protobuf types (e.g., `*p2p_api.GetPeersResponse`) in interface signatures
- Use simple, idiomatic Go return types: `error` for success/fail, `bool` for yes/no, `[]string` for lists
- Prefer existing domain structs over creating new minimal types

**Client Layer** (`Client.go`):
- Keep the protobuf/gRPC import for internal use (e.g., `import "github.com/bsv-blockchain/teranode/services/p2p/p2p_api"`)
- Maintain internal gRPC client field (e.g., `client p2p_api.PeerServiceClient`)
- Public methods match the interface signatures (native types)
- Convert between native types and protobuf types internally using helper functions

**Benefits**:
- Cleaner API boundaries between services
- Reduces coupling to gRPC implementation details
- Makes interfaces more testable (no protobuf dependencies needed for mocks)
- Uses idiomatic Go types that are easier to work with

**Example**:
```go
// Interface.go - Clean, no protobuf types
type ClientI interface {
GetPeers(ctx context.Context) ([]*PeerInfo, error)
BanPeer(ctx context.Context, peerID string, duration int64, reason string) error
IsBanned(ctx context.Context, peerID string) (bool, error)
ListBanned(ctx context.Context) ([]string, error)
}

// Client.go - Internal conversion
type Client struct {
client p2p_api.PeerServiceClient // gRPC client
}

func (c *Client) GetPeers(ctx context.Context) ([]*PeerInfo, error) {
resp, err := c.client.GetPeers(ctx, &emptypb.Empty{})
if err != nil {
return nil, err
}
// Convert p2p_api types to native PeerInfo
return convertFromAPIResponse(resp), nil
}
```

## Git Workflow (Fork Mode)

All developers work in forked repositories with `upstream` remote pointing to the original repo.
Expand Down
4 changes: 2 additions & 2 deletions cmd/filereader/file_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func handleSubtreeData(br *bufio.Reader, logger ulogger.Logger, settings *settin
return errors.NewProcessingError("error reading subtree", err)
}

var sd *subtree.SubtreeData
var sd *subtree.Data

sd, err = subtree.NewSubtreeDataFromReader(st, br)
if err != nil {
Expand Down Expand Up @@ -258,7 +258,7 @@ func handleSubtreeMeta(br *bufio.Reader, logger ulogger.Logger, settings *settin
return errors.NewProcessingError("error reading subtree", err)
}

var subtreeMeta *subtree.SubtreeMeta
var subtreeMeta *subtree.Meta

subtreeMeta, err = subtree.NewSubtreeMetaFromReader(st, br)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const (
loggerTransactions = "txs"
loggerTxValidator = "txval"
loggerUtxos = "utxos"
loggerAlert = "alert"

// Service names
serviceAlert = "alert"
Expand Down
67 changes: 48 additions & 19 deletions daemon/daemon_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@ func (d *Daemon) startAssetService(ctx context.Context, appSettings *settings.Se
return err
}

// Get the P2P client for the Asset service
var p2pClient p2p.ClientI

p2pClient, err = d.daemonStores.GetP2PClient(
ctx, createLogger(loggerP2P), appSettings,
)
if err != nil {
return err
}

// Initialize the Asset service with the necessary parts
return d.ServiceManager.AddService(serviceAssetFormal, asset.NewServer(
createLogger(serviceAsset),
Expand All @@ -411,6 +421,7 @@ func (d *Daemon) startAssetService(ctx context.Context, appSettings *settings.Se
blockPersisterStore,
blockchainClient,
blockvalidationClient,
p2pClient,
))
}

Expand All @@ -433,25 +444,25 @@ func (d *Daemon) startRPCService(ctx context.Context, appSettings *settings.Sett
return err
}

blockAssemblyClient, err := blockassembly.NewClient(ctx, createLogger("ba"), appSettings)
blockAssemblyClient, err := GetBlockAssemblyClient(ctx, createLogger("rpc"), appSettings)
if err != nil {
return err
}

peerClient, err := peer.NewClient(ctx, createLogger("peer"), appSettings)
peerClient, err := peer.NewClient(ctx, createLogger("rpc"), appSettings)
if err != nil {
return err
}

p2pClient, err := p2p.NewClient(ctx, createLogger("p2p"), appSettings)
p2pClient, err := d.daemonStores.GetP2PClient(ctx, createLogger("rpc"), appSettings)
if err != nil {
return err
}

// Create block validation client for RPC service
var blockValidationClient blockvalidation.Interface

blockValidationClient, err = d.daemonStores.GetBlockValidationClient(ctx, createLogger("blockvalidation"), appSettings)
blockValidationClient, err = d.daemonStores.GetBlockValidationClient(ctx, createLogger("rpc"), appSettings)
if err != nil {
return err
}
Expand Down Expand Up @@ -481,7 +492,7 @@ func (d *Daemon) startRPCService(ctx context.Context, appSettings *settings.Sett
}

// Add the RPC service to the ServiceManager
if err := d.ServiceManager.AddService(serviceRPCFormal, rpcServer); err != nil {
if err = d.ServiceManager.AddService(serviceRPCFormal, rpcServer); err != nil {
return err
}

Expand All @@ -490,43 +501,43 @@ func (d *Daemon) startRPCService(ctx context.Context, appSettings *settings.Sett

// startAlertService initializes and adds the Alert service to the ServiceManager.
func (d *Daemon) startAlertService(ctx context.Context, appSettings *settings.Settings,
createLogger func(string) ulogger.Logger) error {
createLogger func(string) ulogger.Logger) (err error) {
var (
blockchainClient blockchain.ClientI
utxoStore utxo.Store
blockAssemblyClient blockassembly.ClientI
peerClient peer.ClientI
p2pClient p2p.ClientI
)

// Create the blockchain client for the Alert service
blockchainClient, err := d.daemonStores.GetBlockchainClient(
blockchainClient, err = d.daemonStores.GetBlockchainClient(
ctx, createLogger(loggerBlockchainClient), appSettings, serviceAlert,
)
if err != nil {
return err
}

// Create the UTXO store for the Alert service
var utxoStore utxo.Store

utxoStore, err = d.daemonStores.GetUtxoStore(ctx, createLogger(loggerUtxos), appSettings)
utxoStore, err = d.daemonStores.GetUtxoStore(ctx, createLogger(loggerAlert), appSettings)
if err != nil {
return err
}

// Create the block assembly client for the Alert service
var blockAssemblyClient *blockassembly.Client

blockAssemblyClient, err = blockassembly.NewClient(ctx, createLogger(loggerBlockAssembly), appSettings)
blockAssemblyClient, err = GetBlockAssemblyClient(ctx, createLogger(loggerAlert), appSettings)
if err != nil {
return err
}

// Create the peer client for the Alert service
var peerClient peer.ClientI

peerClient, err = peer.NewClient(ctx, createLogger(loggerPeerClient), appSettings)
peerClient, err = peer.NewClient(ctx, createLogger(loggerAlert), appSettings)
if err != nil {
return err
}

// Create the P2P client for the Alert service
var p2pClient p2p.ClientI

p2pClient, err = p2p.NewClient(ctx, createLogger(loggerP2P), appSettings)
p2pClient, err = d.daemonStores.GetP2PClient(ctx, createLogger(loggerAlert), appSettings)
if err != nil {
return err
}
Expand Down Expand Up @@ -762,6 +773,14 @@ func (d *Daemon) startValidationService(
return err
}

// Create the P2P client for the SubtreeValidation service
var p2pClient p2p.ClientI

p2pClient, err = d.daemonStores.GetP2PClient(ctx, createLogger(loggerP2P), appSettings)
if err != nil {
return err
}

// Create the SubtreeValidation service
var service *subtreevalidation.Server

Expand All @@ -776,6 +795,7 @@ func (d *Daemon) startValidationService(
blockchainClient,
subtreeConsumerClient,
txMetaConsumerClient,
p2pClient,
)
if err != nil {
return err
Expand Down Expand Up @@ -810,6 +830,14 @@ func (d *Daemon) startValidationService(
return err
}

// Create the P2P client for the BlockValidation service
var p2pClient p2p.ClientI

p2pClient, err = d.daemonStores.GetP2PClient(ctx, createLogger(loggerP2P), appSettings)
if err != nil {
return err
}

// Create the BlockValidation service
d.blockValidationSrv = blockvalidation.New(
createLogger(loggerBlockValidation),
Expand All @@ -821,6 +849,7 @@ func (d *Daemon) startValidationService(
blockchainClient,
kafkaConsumerClient,
blockAssemblyClient,
p2pClient,
)

// Add the BlockValidation service to the ServiceManager
Expand Down
30 changes: 30 additions & 0 deletions daemon/daemon_stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/bsv-blockchain/teranode/services/blockassembly"
"github.com/bsv-blockchain/teranode/services/blockchain"
"github.com/bsv-blockchain/teranode/services/blockvalidation"
"github.com/bsv-blockchain/teranode/services/p2p"
"github.com/bsv-blockchain/teranode/services/subtreevalidation"
"github.com/bsv-blockchain/teranode/services/validator"
"github.com/bsv-blockchain/teranode/settings"
Expand All @@ -24,6 +25,7 @@ type Stores struct {
mainBlockPersisterStore blob.Store
mainBlockStore blob.Store
mainBlockValidationClient blockvalidation.Interface
mainP2PClient p2p.ClientI
mainSubtreeStore blob.Store
mainSubtreeValidationClient subtreevalidation.Interface
mainTempStore blob.Store
Expand Down Expand Up @@ -83,6 +85,33 @@ func (d *Stores) GetBlockValidationClient(ctx context.Context, logger ulogger.Lo
return d.mainBlockValidationClient, err
}

// GetP2PClient creates and returns a new P2P client instance. Unlike other store getters, this function
// always creates a new client instance to maintain source information. The source parameter
// identifies the origin or purpose of the client.
//
// Parameters:
// - ctx: The context for managing the client's lifecycle.
// - logger: The logger instance for logging client activities.
// - appSettings: The application settings containing configuration details.
//
// Returns:
// - p2p.ClientI: The newly created P2P client instance.
// - error: An error object if the client creation fails; otherwise, nil.
func (d *Stores) GetP2PClient(ctx context.Context, logger ulogger.Logger, appSettings *settings.Settings) (p2p.ClientI, error) {
if d.mainP2PClient != nil {
return d.mainP2PClient, nil
}

p2pClient, err := p2p.NewClient(ctx, logger, appSettings)
if err != nil {
return nil, err
}

d.mainP2PClient = p2pClient

return p2pClient, nil
}

// GetBlockchainClient creates and returns a new blockchain client instance. Unlike other store
// getters, this function always creates a new client instance to maintain source information.
// The source parameter identifies the origin or purpose of the client.
Expand Down Expand Up @@ -376,6 +405,7 @@ func (d *Stores) Cleanup() {
d.mainTxStore = nil
d.mainUtxoStore = nil
d.mainValidatorClient = nil
d.mainP2PClient = nil

// Reset the Aerospike cleanup service singleton if it exists
// This prevents state leakage between test runs
Expand Down
10 changes: 5 additions & 5 deletions daemon/test_daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ func createAndSaveSubtrees(ctx context.Context, subtreeStore blob.Store, txs []*
}

// storeSubtreeFiles serializes and stores the subtree, subtree data, and subtree meta in the provided subtree store.
func storeSubtreeFiles(ctx context.Context, subtreeStore blob.Store, subtree *subtreepkg.Subtree, subtreeData *subtreepkg.SubtreeData, subtreeMeta *subtreepkg.SubtreeMeta) error {
func storeSubtreeFiles(ctx context.Context, subtreeStore blob.Store, subtree *subtreepkg.Subtree, subtreeData *subtreepkg.Data, subtreeMeta *subtreepkg.Meta) error {
subtreeBytes, err := subtree.Serialize()
if err != nil {
return err
Expand Down Expand Up @@ -1874,22 +1874,22 @@ func (td *TestDaemon) ConnectToPeer(t *testing.T, peer *TestDaemon) {

return
case <-ticker.C:
r, err := td.P2PClient.GetPeers(td.Ctx)
peers, err := td.P2PClient.GetPeers(td.Ctx)
if err != nil {
// If there's an error calling RPC, log it and continue retrying
t.Logf("Error calling getpeerinfo: %v. Retrying...", err)
continue
}

if len(r.Peers) == 0 {
if len(peers) == 0 {
t.Logf("getpeerinfo returned empty peer list. Retrying...")
continue
}

found := false

for _, p := range r.Peers {
if p != nil && p.Id == peer.Settings.P2P.PeerID {
for _, p := range peers {
if p != nil && p.ID.String() == peer.Settings.P2P.PeerID {
found = true
break
}
Expand Down
2 changes: 1 addition & 1 deletion docs/references/services/blockvalidation_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Validates a block and returns validation results without adding it to the blockc
#### processBlockFound

```go
func (u *Server) processBlockFound(ctx context.Context, hash *chainhash.Hash, baseURL string, peerID string, useBlock ...*model.Block) error
func (u *Server) processBlockFound(ctx context.Context, hash *chainhash.Hash, peerID string, baseURL string, useBlock ...*model.Block) error
```

Internal method that processes a newly discovered block. Handles block retrieval, validation, and integration with the blockchain state.
Expand Down
7 changes: 0 additions & 7 deletions docs/references/settings/services/p2p_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,10 @@
| BanDuration | time.Duration | 24h | p2p_ban_duration | Ban duration |
| ForceSyncPeer | string | "" | p2p_force_sync_peer | **CRITICAL** - Forced sync peer override |
| SharePrivateAddresses | bool | true | p2p_share_private_addresses | Private address advertisement |
| PeerHealthCheckInterval | time.Duration | 30s | p2p_health_check_interval | **CRITICAL** - Health check timing |
| PeerHealthHTTPTimeout | time.Duration | 5s | p2p_health_http_timeout | **CRITICAL** - Health check HTTP timeout |
| PeerHealthRemoveAfterFailures | int | 3 | p2p_health_remove_after_failures | **CRITICAL** - Failure threshold for peer removal |
| AllowPrunedNodeFallback | bool | true | p2p_allow_pruned_node_fallback | **CRITICAL** - Pruned node fallback behavior |

## Configuration Dependencies

### Peer Health Management
- `PeerHealthCheckInterval`, `PeerHealthHTTPTimeout`, and `PeerHealthRemoveAfterFailures` work together
- Controls peer health monitoring and removal behavior

### Forced Sync Peer Selection
- `ForceSyncPeer` overrides automatic peer selection
- `AllowPrunedNodeFallback` affects fallback behavior when forced peer unavailable
Expand Down
6 changes: 6 additions & 0 deletions errors/Error_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var (
ErrBlockInvalidFormat = New(ERR_BLOCK_INVALID_FORMAT, "block format is invalid")
ErrBlockNotFound = New(ERR_BLOCK_NOT_FOUND, "block not found")
ErrBlockParentNotMined = New(ERR_BLOCK_PARENT_NOT_MINED, "block parent not mined")
ErrCatchupInProgress = New(ERR_CATCHUP_IN_PROGRESS, "catchup in progress")
ErrConfiguration = New(ERR_CONFIGURATION, "configuration error")
ErrContextCanceled = New(ERR_CONTEXT_CANCELED, "context canceled")
ErrError = New(ERR_ERROR, "generic error")
Expand Down Expand Up @@ -281,6 +282,11 @@ func NewStateInitializationError(message string, params ...interface{}) *Error {
return New(ERR_STATE_INITIALIZATION, message, params...)
}

// NewCatchupInProgressError creates a new error with the catchup in progress error code.
func NewCatchupInProgressError(message string, params ...interface{}) *Error {
return New(ERR_CATCHUP_IN_PROGRESS, message, params...)
}

// NewStateError creates a new error with the state error code.
func NewStateError(message string, params ...interface{}) *Error {
return New(ERR_STATE_ERROR, message, params...)
Expand Down
Loading