From 0098387fbf23f942ce09509b51ebcaf729feba35 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 11 Oct 2016 19:12:39 -0400 Subject: [PATCH] consensus: hvs.StringIndented needed a lock. addresses #284 --- consensus/height_vote_set.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consensus/height_vote_set.go b/consensus/height_vote_set.go index 583ef3f6f..5cc181b1b 100644 --- a/consensus/height_vote_set.go +++ b/consensus/height_vote_set.go @@ -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++ {