mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-22 07:06:14 +00:00
Remove ExtendedCommitSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -737,11 +737,6 @@ func NewExtendedCommitSigAbsent() ExtendedCommitSig {
|
||||
return ExtendedCommitSig{BlockIDFlag: BlockIDFlagAbsent}
|
||||
}
|
||||
|
||||
// ForBlock returns true if ExtendedCommitSig is for the block.
|
||||
func (ecs ExtendedCommitSig) ForBlock() bool {
|
||||
return ecs.BlockIDFlag == BlockIDFlagCommit
|
||||
}
|
||||
|
||||
// Absent returns true if ExtendedCommitSig is absent.
|
||||
func (ecs ExtendedCommitSig) Absent() bool {
|
||||
// TODO(sergio): What about BlockIDFlagNil?
|
||||
|
||||
+1
-1
@@ -628,7 +628,7 @@ func (voteSet *VoteSet) MakeExtendedCommit() *ExtendedCommit {
|
||||
for i, v := range voteSet.votes {
|
||||
sig := v.ExtendedCommitSig()
|
||||
// if block ID exists but doesn't match, exclude sig
|
||||
if sig.ForBlock() && !v.BlockID.Equals(*voteSet.maj23) {
|
||||
if sig.BlockIDFlag == BlockIDFlagCommit && !v.BlockID.Equals(*voteSet.maj23) {
|
||||
sig = NewExtendedCommitSigAbsent()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user