mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-04 18:01:57 +01:00
lnd+routing+rpc: switch mc to (external) estimator
We use a more general `Estimator` interface for probability estimation in missioncontrol. The estimator is created outside of `NewMissionControl`, passed in as a `MissionControlConfig` field, to facilitate usage of externally supplied estimators.
This commit is contained in:
@@ -67,7 +67,10 @@ func TestProbabilityExtrapolation(t *testing.T) {
|
||||
// If we use a static value for the node probability (no extrapolation
|
||||
// of data from other channels), all ten bad channels will be tried
|
||||
// first before switching to the paid channel.
|
||||
ctx.mcCfg.AprioriWeight = 1
|
||||
estimator, ok := ctx.mcCfg.Estimator.(*AprioriEstimator)
|
||||
if ok {
|
||||
estimator.AprioriWeight = 1
|
||||
}
|
||||
attempts, err = ctx.testPayment(1)
|
||||
require.NoError(t, err, "payment failed")
|
||||
if len(attempts) != 11 {
|
||||
|
||||
Reference in New Issue
Block a user