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:
carla committed 2021-01-19 10:57:10 +02:00
1 parent b2857bf392
commit 0735d359b9
6 files changed
+11 -16

No files matched your search

+1 -2
View File
@@ -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,
},
)