Merge pull request #10970 from nilsocket/minorFix1

raft : remove unnecessary, if check
This commit is contained in:
Xiang Li 2019-08-09 11:03:01 -07:00 committed by GitHub
commit 84c69cca76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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