Explorar o código

raft: use IsEmptyState

Xiang Li %!s(int64=12) %!d(string=hai) anos
pai
achega
676b5be972
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      raft/node.go

+ 1 - 1
raft/node.go

@@ -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 {