Browse Source

consensus: hvs.StringIndented needed a lock. addresses #284

pull/298/head
Ethan Buchman 8 years ago
parent
commit
0098387fbf
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      consensus/height_vote_set.go

+ 2
- 0
consensus/height_vote_set.go View File

@ -167,6 +167,8 @@ func (hvs *HeightVoteSet) 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)
// rounds 0 ~ hvs.round inclusive
for round := 0; round <= hvs.round; round++ {


Loading…
Cancel
Save