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:
Marko
2020-07-20 07:55:09 +00:00
committed by GitHub
parent 8cdb53c811
commit 2ac5a559b4
61 changed files with 182 additions and 145 deletions
+2 -2
View File
@@ -3,11 +3,11 @@ package store
import (
"fmt"
"strconv"
"sync"
"github.com/gogo/protobuf/proto"
dbm "github.com/tendermint/tm-db"
tmsync "github.com/tendermint/tendermint/libs/sync"
tmstore "github.com/tendermint/tendermint/proto/tendermint/store"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
@@ -33,7 +33,7 @@ The store can be assumed to contain all contiguous blocks between base and heigh
type BlockStore struct {
db dbm.DB
mtx sync.RWMutex
mtx tmsync.RWMutex
base int64
height int64
}