Browse Source

Merge pull request #10970 from nilsocket/minorFix1

raft : remove unnecessary, if check
Xiang Li 6 years ago
parent
commit
84c69cca76
1 changed files with 0 additions and 3 deletions
  1. 0 3
      raft/rawnode.go

+ 0 - 3
raft/rawnode.go

@@ -45,9 +45,6 @@ type RawNode struct {
 // state manually by setting up a Storage that has a first index > 1 and which
 // stores the desired ConfState as its InitialState.
 func NewRawNode(config *Config) (*RawNode, error) {
-	if config.ID == 0 {
-		panic("config.ID must not be zero")
-	}
 	r := newRaft(config)
 	rn := &RawNode{
 		raft: r,