mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #10970 from nilsocket/minorFix1
raft : remove unnecessary, if check
This commit is contained in:
commit
84c69cca76
@ -45,9 +45,6 @@ type RawNode struct {
|
|||||||
// state manually by setting up a Storage that has a first index > 1 and which
|
// state manually by setting up a Storage that has a first index > 1 and which
|
||||||
// stores the desired ConfState as its InitialState.
|
// stores the desired ConfState as its InitialState.
|
||||||
func NewRawNode(config *Config) (*RawNode, error) {
|
func NewRawNode(config *Config) (*RawNode, error) {
|
||||||
if config.ID == 0 {
|
|
||||||
panic("config.ID must not be zero")
|
|
||||||
}
|
|
||||||
r := newRaft(config)
|
r := newRaft(config)
|
||||||
rn := &RawNode{
|
rn := &RawNode{
|
||||||
raft: r,
|
raft: r,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user