From c575e1dcb2f2b4b3d799df6074f7492fbd08de17 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 2 Aug 2023 12:22:40 +0200 Subject: [PATCH] linter --- hare3/hare.go | 1 - hare3/legacy_oracle.go | 3 ++- hare3/protocol.go | 2 -- hare3/protocol_test.go | 2 +- hare3/types.go | 5 +++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hare3/hare.go b/hare3/hare.go index 2a7b23f17e..fe9db00052 100644 --- a/hare3/hare.go +++ b/hare3/hare.go @@ -103,7 +103,6 @@ func (inputs *instanceInputs) submit(msg *input) (*response, error) { case <-inputs.ctx.Done(): return nil, inputs.ctx.Err() } - } type Opt func(*Hare) diff --git a/hare3/legacy_oracle.go b/hare3/legacy_oracle.go index 70d920c2b8..ce6e9338f3 100644 --- a/hare3/legacy_oracle.go +++ b/hare3/legacy_oracle.go @@ -4,9 +4,10 @@ import ( "context" "errors" + "go.uber.org/zap" + "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/hare/eligibility" - "go.uber.org/zap" ) type oracle interface { diff --git a/hare3/protocol.go b/hare3/protocol.go index 2818b8598c..8079cb8905 100644 --- a/hare3/protocol.go +++ b/hare3/protocol.go @@ -9,8 +9,6 @@ import ( "github.com/spacemeshos/go-spacemesh/log" ) -type round = Round - type grade uint8 const ( diff --git a/hare3/protocol_test.go b/hare3/protocol_test.go index 8f36576d8a..423efca7bf 100644 --- a/hare3/protocol_test.go +++ b/hare3/protocol_test.go @@ -3,11 +3,11 @@ package hare3 import ( "testing" + "github.com/stretchr/testify/require" "go.uber.org/zap" "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/log/logtest" - "github.com/stretchr/testify/require" ) func castIds(strings ...string) []types.ProposalID { diff --git a/hare3/types.go b/hare3/types.go index 750b0da7f8..b988566a98 100644 --- a/hare3/types.go +++ b/hare3/types.go @@ -3,11 +3,12 @@ package hare3 import ( "fmt" + "go.uber.org/zap/zapcore" + "github.com/spacemeshos/go-spacemesh/codec" "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/hash" "github.com/spacemeshos/go-spacemesh/log" - "go.uber.org/zap/zapcore" ) type Round uint8 @@ -18,7 +19,7 @@ func (r Round) String() string { return roundNames[r] } -// NOTE(dshulyak) changes in order is a breaking change +// NOTE(dshulyak) changes in order is a breaking change. const ( preround Round = iota hardlock