Skip to content

Commit

Permalink
appease the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed May 24, 2024
1 parent 28f494b commit 6a4cad9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions curiosrc/web/api/webrpc/sync_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ func (a *WebRPC) loadConfigs(ctx context.Context) (map[string]string, error) {
return configs, nil
}

type rpcInfo struct {
type RpcInfo struct {
Address string
CLayers []string
Reachable bool
SyncState string
Version string
}

func (a *WebRPC) SyncerState(ctx context.Context) ([]rpcInfo, error) {
func (a *WebRPC) SyncerState(ctx context.Context) ([]RpcInfo, error) {
type minimalApiInfo struct {
Apis struct {
ChainApiInfo []string
Expand Down Expand Up @@ -93,7 +93,7 @@ func (a *WebRPC) SyncerState(ctx context.Context) ([]rpcInfo, error) {

dedup := map[string]bool{} // for dedup by address

infos := map[string]rpcInfo{} // api address -> rpc info
infos := map[string]RpcInfo{} // api address -> rpc info
var infosLk sync.Mutex

var wg sync.WaitGroup
Expand All @@ -113,7 +113,7 @@ func (a *WebRPC) SyncerState(ctx context.Context) ([]rpcInfo, error) {
}
}

myinfo := rpcInfo{
myinfo := RpcInfo{
Address: ai.Addr,
Reachable: false,
CLayers: clayers,
Expand Down Expand Up @@ -160,7 +160,7 @@ func (a *WebRPC) SyncerState(ctx context.Context) ([]rpcInfo, error) {
syncState = fmt.Sprintf("behind (%s behind)", time.Since(time.Unix(int64(head.MinTimestamp()), 0)).Truncate(time.Second))
}

myinfo = rpcInfo{
myinfo = RpcInfo{
Address: ai.Addr,
CLayers: clayers,
Reachable: true,
Expand All @@ -171,7 +171,7 @@ func (a *WebRPC) SyncerState(ctx context.Context) ([]rpcInfo, error) {
}
wg.Wait()

var infoList []rpcInfo
var infoList []RpcInfo
for _, i := range infos {
infoList = append(infoList, i)
}
Expand Down

0 comments on commit 6a4cad9

Please sign in to comment.