router: move self node out of config
We are going to use the config struct to allow getting and setting of the mission control config in the commits that follow. Self node is not something we want to change, so we move it out for better separation.
This commit is contained in:
6 files changed
+11
-16
No files matched your search
@@ -726,13 +726,12 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
routingConfig := routerrpc.GetRoutingConfig(cfg.SubRPCServers.RouterRPC)
|
||||
|
||||
s.missionControl, err = routing.NewMissionControl(
|
||||
remoteChanDB,
|
||||
remoteChanDB, selfNode.PubKeyBytes,
|
||||
&routing.MissionControlConfig{
|
||||
AprioriHopProbability: routingConfig.AprioriHopProbability,
|
||||
PenaltyHalfLife: routingConfig.PenaltyHalfLife,
|
||||
MaxMcHistory: routingConfig.MaxMcHistory,
|
||||
AprioriWeight: routingConfig.AprioriWeight,
|
||||
SelfNode: selfNode.PubKeyBytes,
|
||||
MinFailureRelaxInterval: routing.DefaultMinFailureRelaxInterval,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user