Skip to content

Commit

Permalink
style: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanVergiliev committed Sep 19, 2022
1 parent 7d2615c commit aadd18b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions internal/checks/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ type healthCheckManager struct {
newPeerCheck func(upstreamConfig *conf.UpstreamConfig, clientGetter client.EthClientGetter) types.Checker
newSyncingCheck func(upstreamConfig *conf.UpstreamConfig, clientGetter client.EthClientGetter) types.Checker
blockHeightObserver BlockHeightObserver
configs []conf.UpstreamConfig
healthCheckTicker *time.Ticker
configs []conf.UpstreamConfig
}

func NewHealthCheckManager(
Expand Down Expand Up @@ -139,6 +139,7 @@ func (h *healthCheckManager) initializeChecks() {

func (h *healthCheckManager) runPeriodicChecks() {
h.runChecksOnce()

for range h.healthCheckTicker.C {
h.runChecksOnce()
}
Expand Down Expand Up @@ -174,6 +175,4 @@ func (h *healthCheckManager) runChecksOnce() {
}

wg.Wait()
//
//time.Sleep(periodicHealthCheckInterval)
}
1 change: 0 additions & 1 deletion internal/checks/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func TestHealthCheckManager(t *testing.T) {

tickerChan := make(chan time.Time)
ticker := &time.Ticker{C: tickerChan}
//ticker := time.NewTicker(5 * time.Second)

manager := NewHealthCheckManager(mockEthClientGetter, configs, nil, ticker)
manager.(*healthCheckManager).newBlockHeightCheck = func(
Expand Down
4 changes: 2 additions & 2 deletions internal/route/node_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ type NodeFilterType string

const (
IsHealthy NodeFilterType = "healthy"
GlobalMaxHeight = "globalMaxHeight"
MaxHeightForGroup = "maxHeightForGroup"
GlobalMaxHeight NodeFilterType = "globalMaxHeight"
MaxHeightForGroup NodeFilterType = "maxHeightForGroup"
)
4 changes: 3 additions & 1 deletion internal/route/node_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ func TestAndFilter_Apply(t *testing.T) {
type fields struct {
filters []NodeFilter
}

type args struct {
requestMetadata *RequestMetadata
upstreamConfig *config.UpstreamConfig
}
tests := []struct {

tests := []struct { //nolint:govet // field alignment doesn't matter in tests
name string
fields fields
args args
Expand Down

0 comments on commit aadd18b

Please sign in to comment.