Browse Source

raft: refine plus assignment

Yicheng Qin 11 years ago
parent
commit
2927cc6e3b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      raft/raft_test.go

+ 1 - 1
raft/raft_test.go

@@ -963,7 +963,7 @@ func (nw *network) cut(one, other int64) {
 
 func (nw *network) isolate(id int64) {
 	for i := 0; i < len(nw.peers); i++ {
-		nid := 1 + int64(i)
+		nid := int64(i) + 1
 		if nid != id {
 			nw.drop(id, nid, 1.0)
 			nw.drop(nid, id, 1.0)