Ejemplo n.º 1
0
// Convenience: Return new vote with different blockParts
func withBlockParts(vote *types.Vote, blockParts types.PartSetHeader) *types.Vote {
	vote = vote.Copy()
	vote.BlockParts = blockParts
	return vote
}
Ejemplo n.º 2
0
// Convenience: Return new vote with different blockHash
func withBlockHash(vote *types.Vote, blockHash []byte) *types.Vote {
	vote = vote.Copy()
	vote.BlockHash = blockHash
	return vote
}
Ejemplo n.º 3
0
// Convenience: Return new vote with different round
func withRound(vote *types.Vote, round int) *types.Vote {
	vote = vote.Copy()
	vote.Round = round
	return vote
}
Ejemplo n.º 4
0
// Convenience: Return new vote with different type
func withType(vote *types.Vote, type_ byte) *types.Vote {
	vote = vote.Copy()
	vote.Type = type_
	return vote
}
Ejemplo n.º 5
0
// Convenience: Return new vote with different height
func withHeight(vote *types.Vote, height int) *types.Vote {
	vote = vote.Copy()
	vote.Height = height
	return vote
}