mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-15 11:46:11 +00:00
update some comments
This commit is contained in:
+1
-1
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user