Explorar o código

raft: minor change on code

Yicheng Qin %!s(int64=11) %!d(string=hai) anos
pai
achega
431ff3cce1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      raft/node.go

+ 1 - 1
raft/node.go

@@ -195,7 +195,7 @@ func (n *Node) Next() []Entry {
 // If the current elapsed is greater or equal than the timeout,
 // If the current elapsed is greater or equal than the timeout,
 // node will send corresponding message to the statemachine.
 // node will send corresponding message to the statemachine.
 func (n *Node) Tick() {
 func (n *Node) Tick() {
-	if n.sm.promotable == false {
+	if !n.sm.promotable {
 		return
 		return
 	}
 	}