mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-26 11:36:26 -08:00
shorten
This commit is contained in:
1 parent
c4110ec886
commit
7dbcb388b8
1 file changed
+2
-3
@@ -212,8 +212,7 @@ func Start(ctx context.Context, ts *tsnet.Server, fsm raft.FSM, clusterTag strin
|
||||
}
|
||||
|
||||
func startRaft(ts *tsnet.Server, fsm *raft.FSM, self selfRaftNode, auth *authorization, cfg Config) (*raft.Raft, error) {
|
||||
config := cfg.Raft
|
||||
config.LocalID = raft.ServerID(self.id)
|
||||
cfg.Raft.LocalID = raft.ServerID(self.id)
|
||||
|
||||
// no persistence (for now?)
|
||||
logStore := raft.NewInmemStore()
|
||||
@@ -241,7 +240,7 @@ func startRaft(ts *tsnet.Server, fsm *raft.FSM, self selfRaftNode, auth *authori
|
||||
cfg.ConnTimeout,
|
||||
logger)
|
||||
|
||||
return raft.NewRaft(config, *fsm, logStore, stableStore, snapshots, transport)
|
||||
return raft.NewRaft(cfg.Raft, *fsm, logStore, stableStore, snapshots, transport)
|
||||
}
|
||||
|
||||
// A Consensus is the consensus algorithm for a tsnet.Server
|
||||
|
||||
Reference in new issue
Block a user