mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-30 17:22:13 +00:00
consensus: hvs.StringIndented needed a lock. addresses #284
This commit is contained in:
parent
7e07919d9d
commit
0098387fbf
@ -167,6 +167,8 @@ func (hvs *HeightVoteSet) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (hvs *HeightVoteSet) StringIndented(indent string) string {
|
func (hvs *HeightVoteSet) StringIndented(indent string) string {
|
||||||
|
hvs.mtx.Lock()
|
||||||
|
defer hvs.mtx.Unlock()
|
||||||
vsStrings := make([]string, 0, (len(hvs.roundVoteSets)+1)*2)
|
vsStrings := make([]string, 0, (len(hvs.roundVoteSets)+1)*2)
|
||||||
// rounds 0 ~ hvs.round inclusive
|
// rounds 0 ~ hvs.round inclusive
|
||||||
for round := 0; round <= hvs.round; round++ {
|
for round := 0; round <= hvs.round; round++ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user