raft : newRaft() does check for validity of Config

This commit is contained in:
nilsocket 2019-08-02 03:09:51 +05:30
parent d5bd600aa5
commit 0d99469cdb
No known key found for this signature in database
GPG Key ID: 99BA5E54C20FEAB6

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,