Skip to content

Commit dda786e

Browse files
committed
remove testMakeVoteCheckMu
1 parent 52a70c3 commit dda786e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

agreement/vote.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/algorand/go-algorand/data/committee"
2626
"github.com/algorand/go-algorand/logging"
2727
"github.com/algorand/go-algorand/protocol"
28-
"github.com/algorand/go-deadlock"
2928
)
3029

3130
type (
@@ -150,13 +149,10 @@ func (uv unauthenticatedVote) verify(l LedgerReader) (vote, error) {
150149
var (
151150
// testMakeVoteCheckFunction is a function that can be set to check every
152151
// unauthenticatedVote before it is returned by makeVote. It is only set by tests.
153-
testMakeVoteCheck func(*unauthenticatedVote) error
154-
testMakeVoteCheckMu deadlock.RWMutex
152+
testMakeVoteCheck func(*unauthenticatedVote) error
155153
)
156154

157155
func getTestMakeVoteCheck() func(*unauthenticatedVote) error {
158-
testMakeVoteCheckMu.RLock()
159-
defer testMakeVoteCheckMu.RUnlock()
160156
return testMakeVoteCheck
161157
}
162158

agreement/vote_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ import (
3737
)
3838

3939
func init() {
40-
testMakeVoteCheckMu.Lock()
4140
testMakeVoteCheck = testVPackMakeVote
42-
testMakeVoteCheckMu.Unlock()
4341
}
4442

4543
func testVPackMakeVote(v *unauthenticatedVote) error {

0 commit comments

Comments
 (0)