types: copy vote set bit array

This commit is contained in:
Ethan Buchman
2016-12-06 20:53:02 -05:00
parent 8df32cd540
commit 69ef1da58c

View File

@@ -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
}