mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 03:01:42 +00:00
consensus reactor code polish, fixed prs BitArray cache invalidation bug
This commit is contained in:
@ -67,6 +67,14 @@ func (voteSet *VoteSet) Round() int {
|
||||
}
|
||||
}
|
||||
|
||||
func (voteSet *VoteSet) Type() byte {
|
||||
if voteSet == nil {
|
||||
return 0x00
|
||||
} else {
|
||||
return voteSet.type_
|
||||
}
|
||||
}
|
||||
|
||||
func (voteSet *VoteSet) Size() int {
|
||||
if voteSet == nil {
|
||||
return 0
|
||||
@ -193,6 +201,15 @@ func (voteSet *VoteSet) HasTwoThirdsMajority() bool {
|
||||
return voteSet.maj23Exists
|
||||
}
|
||||
|
||||
func (voteSet *VoteSet) IsCommit() bool {
|
||||
if voteSet == nil {
|
||||
return false
|
||||
}
|
||||
voteSet.mtx.Lock()
|
||||
defer voteSet.mtx.Unlock()
|
||||
return len(voteSet.maj23Hash) > 0
|
||||
}
|
||||
|
||||
func (voteSet *VoteSet) HasTwoThirdsAny() bool {
|
||||
if voteSet == nil {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user