Merge pull request #4909 from carlaKC/mc-paramsapi

routing: allow runtime updates to mission control config
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-02-10 18:51:53 -08:00
commit 7b0ea3c029
21 files changed
+1155 -254

No files matched your search

+6 -5
View File
@@ -58,10 +58,11 @@ func newIntegratedRoutingContext(t *testing.T) *integratedRoutingContext {
finalExpiry: 40,
mcCfg: MissionControlConfig{
PenaltyHalfLife: 30 * time.Minute,
AprioriHopProbability: 0.6,
AprioriWeight: 0.5,
SelfNode: source.pubkey,
ProbabilityEstimatorCfg: ProbabilityEstimatorCfg{
PenaltyHalfLife: 30 * time.Minute,
AprioriHopProbability: 0.6,
AprioriWeight: 0.5,
},
},
pathFindingCfg: PathFindingConfig{
@@ -123,7 +124,7 @@ func (c *integratedRoutingContext) testPayment(maxParts uint32,
// Instantiate a new mission control with the current configuration
// values.
mc, err := NewMissionControl(db, &c.mcCfg)
mc, err := NewMissionControl(db, c.source.pubkey, &c.mcCfg)
if err != nil {
c.t.Fatal(err)
}