diff --git a/dot/parachain/dispute/backend.go b/dot/parachain/dispute/backend.go index 2c4724daf9..56526c40f8 100644 --- a/dot/parachain/dispute/backend.go +++ b/dot/parachain/dispute/backend.go @@ -49,37 +49,33 @@ type DBBackend interface { } type syncedEarliestSession struct { - *sync.RWMutex + sync.RWMutex *parachainTypes.SessionIndex } func newSyncedEarliestSession() syncedEarliestSession { - return syncedEarliestSession{ - RWMutex: new(sync.RWMutex), - } + return syncedEarliestSession{} } type syncedRecentDisputes struct { - *sync.RWMutex + sync.RWMutex *btree.BTree } func newSyncedRecentDisputes() syncedRecentDisputes { return syncedRecentDisputes{ - RWMutex: new(sync.RWMutex), - BTree: btree.New(types.DisputeComparator), + BTree: btree.New(types.DisputeComparator), } } type syncedCandidateVotes struct { - *sync.RWMutex + sync.RWMutex votes map[types.Comparator]*types.CandidateVotes } func newSyncedCandidateVotes() syncedCandidateVotes { return syncedCandidateVotes{ - RWMutex: new(sync.RWMutex), - votes: make(map[types.Comparator]*types.CandidateVotes), + votes: make(map[types.Comparator]*types.CandidateVotes), } } diff --git a/dot/parachain/dispute/participation_test.go b/dot/parachain/dispute/participation_test.go index 929592fae5..b7db76e840 100644 --- a/dot/parachain/dispute/participation_test.go +++ b/dot/parachain/dispute/participation_test.go @@ -321,6 +321,7 @@ func TestParticipationHandler_Queue(t *testing.T) { }) t.Run("cannot_participate_if_cannot_recover_validation_code", func(t *testing.T) { + t.Parallel() ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -378,6 +379,7 @@ func TestParticipationHandler_Queue(t *testing.T) { }) t.Run("cast_invalid_vote_if_available_data_is_invalid", func(t *testing.T) { + t.Parallel() ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -425,6 +427,7 @@ func TestParticipationHandler_Queue(t *testing.T) { }) t.Run("cast_invalid_vote_if_validation_fails_or_is_invalid", func(t *testing.T) { + t.Parallel() ctrl := gomock.NewController(t) defer ctrl.Finish()