From 69ef1da58cdfd67cd9e3b4cee3e630ee7772295b Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 6 Dec 2016 20:53:02 -0500 Subject: [PATCH] types: copy vote set bit array --- types/vote_set.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/vote_set.go b/types/vote_set.go index e7598532e..10b1aa094 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -325,7 +325,7 @@ func (voteSet *VoteSet) BitArrayByBlockID(blockID BlockID) *BitArray { defer voteSet.mtx.Unlock() votesByBlock, ok := voteSet.votesByBlock[blockID.Key()] if ok { - return votesByBlock.bitArray + return votesByBlock.bitArray.Copy() } return nil }