Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linter errors
Browse files Browse the repository at this point in the history
muXxer committed May 6, 2024
1 parent f91386d commit 073ea50
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
#- exhaustive
#- exhaustruct
- exportloopref
@@ -77,7 +76,7 @@ linters:
#- gocyclo
- godot
#- godox
- goerr113
- err113
- gofmt
#- gofumpt
- goheader
@@ -92,7 +91,7 @@ linters:
- importas
- inamedparam
#- interfacebloat
#- intrange # TODO: re-enable after https://github.com/ckaznocha/intrange v0.1.2 release is merged in golangci-lint
- intrange
#- ireturn
#- lll
- loggercheck
2 changes: 1 addition & 1 deletion pkg/protocol/commitment.go
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ func newCommitment(commitments *Commitments, model *model.Commitment) *Commitmen
WarpSyncBlocks: reactive.NewVariable[bool](),
BlocksToWarpSync: reactive.NewVariable[ds.Set[iotago.BlockID]](),
Weight: reactive.NewVariable[uint64](),
AttestedWeight: reactive.NewVariable[uint64](func(currentValue uint64, newValue uint64) uint64 { return max(currentValue, newValue) }), //nolint:gocritic // easier to read
AttestedWeight: reactive.NewVariable[uint64](func(currentValue uint64, newValue uint64) uint64 { return max(currentValue, newValue) }),
CumulativeWeight: reactive.NewVariable[uint64](),
CumulativeAttestedWeight: reactive.NewVariable[uint64](),
CumulativeVerifiedWeight: reactive.NewVariable[uint64](),
Original file line number Diff line number Diff line change
@@ -549,7 +549,7 @@ func (s *Scheduler) removeIssuer(issuerID iotago.AccountID, err error) {
return true
})

for i := 0; i < q.readyHeap.Len(); i++ {
for i := range q.readyHeap.Len() {
block := q.readyHeap[i].Value
block.SetDropped()
s.events.BlockDropped.Trigger(block, err)

0 comments on commit 073ea50

Please sign in to comment.