New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EN-8515: Linter issues #2609
EN-8515: Linter issues #2609
Conversation
facade/errors.go
Outdated
@@ -23,5 +23,5 @@ var ErrNilPeerState = errors.New("nil peer state") | |||
// ErrNilAccountState signals that a nil account state has been provided | |||
var ErrNilAccountState = errors.New("nil account state") | |||
|
|||
// ErrNilTransactionSimulatorProcessor signals that a nil transaction simulator processor has been provided | |||
// ErrErrNilTransactionSimulatorProcessor signals that a nil transaction simulator processor has been provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove double ErrErr from comment and error variable also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
for key := range chunk.items { | ||
keys = append(keys, key) | ||
} | ||
chunk.mutex.RUnlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -148,11 +148,10 @@ func (m *ConcurrentMap) Keys() []string { | |||
|
|||
for _, chunk := range chunks { | |||
chunk.mutex.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can move this RLock in line 148 and RUnlock from line 154 to line 156, just to avoid multiple locks/unlocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I can't because the mutex belongs to the chunk
element from the range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok
# Conflicts: # epochStart/metachain/epochStartData.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System tests passed.
Fixed relevant issues found by linters. (GoLand built-in linters + GolangCI)