// Convenience: Return new vote with different type func withType(vote *types.Vote, type_ byte) *types.Vote { vote = vote.Copy() vote.Type = type_ return vote }