Skip to content

Commit

Permalink
Remove vm level statesync health check (#1903)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbuchwald authored Jan 31, 2025
1 parent 14ea750 commit a30ea0e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions statesync/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (

var isSyncing = []byte("is_syncing")

var errStateSyncIncomplete = errors.New("state syncing")

type ChainClient[T StateSummaryBlock] interface {
LastAcceptedBlock(ctx context.Context) T
ParseBlock(ctx context.Context, bytes []byte) (T, error)
Expand Down Expand Up @@ -231,14 +229,3 @@ func (c *Client[T]) PutDiskIsSyncing(v bool) error {
}
return c.db.Put(isSyncing, []byte{0x0})
}

func (c *Client[T]) HealthCheck(_ context.Context) (interface{}, error) {
select {
case <-c.done:
c.log.Info("Invoking state sync health check", zap.Error(c.err))
return nil, c.err
default:
c.log.Info("Invoking state sync health check", zap.Error(errStateSyncIncomplete))
return nil, errStateSyncIncomplete
}
}
2 changes: 1 addition & 1 deletion vm/statesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ func (vm *VM) initStateSync(ctx context.Context) error {
server := statesync.NewServer[*chain.ExecutionBlock](vm.snowCtx.Log, inputCovariantVM)
stateSyncableVM := statesync.NewStateSyncableVM(client, server)
vm.snowApp.SetStateSyncableVM(stateSyncableVM)
return vm.snowApp.RegisterHealthChecker(StateSyncNamespace, vm.SyncClient)
return nil
}

0 comments on commit a30ea0e

Please sign in to comment.