From a8b4213ec02ac1e055af7a78fc0f3a38a0524e18 Mon Sep 17 00:00:00 2001 From: nilsocket Date: Fri, 2 Aug 2019 03:09:51 +0530 Subject: [PATCH] raft : `newRaft()` does check for validity of `Config` --- raft/rawnode.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/raft/rawnode.go b/raft/rawnode.go index 9aa8a699b..90eb69493 100644 --- a/raft/rawnode.go +++ b/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,