raft: use IsEmptyState

This commit is contained in:
Xiang Li 2014-09-09 11:58:15 -07:00
parent 6f06923e96
commit 676b5be972

View File

@ -43,7 +43,7 @@ func IsEmptyState(st pb.State) bool {
} }
func (rd Ready) containsUpdates() bool { func (rd Ready) containsUpdates() bool {
return !isStateEqual(emptyState, rd.State) || len(rd.Entries) > 0 || len(rd.CommittedEntries) > 0 || len(rd.Messages) > 0 return !IsEmptyState(rd.State) || len(rd.Entries) > 0 || len(rd.CommittedEntries) > 0 || len(rd.Messages) > 0
} }
type Node struct { type Node struct {