update some comments

This commit is contained in:
Ethan Buchman
2018-05-14 16:32:19 -04:00
parent b5ac9ede8a
commit 162811476a
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ func (b *Block) MakePartSet(partSize int) *PartSet {
}
// HashesTo is a convenience function that checks if a block hashes to the given argument.
// A nil block never hashes to anything, and nothing hashes to a nil hash.
// Returns false if the block is nil or the hash is empty.
func (b *Block) HashesTo(hash []byte) bool {
if len(hash) == 0 {
return false
+2 -2
View File
@@ -404,8 +404,8 @@ func (voteSet *VoteSet) HasAll() bool {
return voteSet.sum == voteSet.valSet.TotalVotingPower()
}
// Returns either a blockhash (or nil) that received +2/3 majority.
// If there exists no such majority, returns (nil, PartSetHeader{}, false).
// If there was a +2/3 majority for blockID, return blockID and true.
// Else, return the empty BlockID{} and false.
func (voteSet *VoteSet) TwoThirdsMajority() (blockID BlockID, ok bool) {
if voteSet == nil {
return BlockID{}, false