mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 13:55:17 +00:00
libs: wrap mutexes for build flag with godeadlock (#5126)
## Description This PR wraps the stdlib sync.(RW)Mutex & godeadlock.(RW)Mutex. This enables using go-deadlock via a build flag instead of using sed to replace sync with godeadlock in all files Closes: #3242
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmsync "github.com/tendermint/tendermint/libs/sync"
|
||||
"github.com/tendermint/tendermint/light/provider"
|
||||
"github.com/tendermint/tendermint/light/store"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
@@ -121,7 +121,7 @@ type Client struct {
|
||||
maxClockDrift time.Duration
|
||||
|
||||
// Mutex for locking during changes of the light clients providers
|
||||
providerMutex sync.Mutex
|
||||
providerMutex tmsync.Mutex
|
||||
// Primary provider of new headers.
|
||||
primary provider.Provider
|
||||
// See Witnesses option
|
||||
|
||||
Reference in New Issue
Block a user