Skip to content

Commit 55e7343

Browse files
committed
routing: update to realistic test values
The bimodal model doesn't depend on the unit, which is why updating to more realistic values doesn't require changes in tests. We pin the scale in the fuzz test to not invalidate the corpus.
1 parent d9089b1 commit 55e7343

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

routing/probability_bimodal_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
)
1212

1313
const (
14-
smallAmount = lnwire.MilliSatoshi(400_000)
15-
largeAmount = lnwire.MilliSatoshi(5_000_000)
16-
capacity = lnwire.MilliSatoshi(10_000_000)
17-
scale = lnwire.MilliSatoshi(400_000)
14+
smallAmount = lnwire.MilliSatoshi(400_000_000)
15+
largeAmount = lnwire.MilliSatoshi(5_000_000_000)
16+
capacity = lnwire.MilliSatoshi(10_000_000_000)
17+
scale = lnwire.MilliSatoshi(400_000_000)
1818
)
1919

2020
// TestSuccessProbability tests that we get correct probability estimates for
@@ -689,7 +689,7 @@ func TestLocalPairProbability(t *testing.T) {
689689
// FuzzProbability checks that we don't encounter errors related to NaNs.
690690
func FuzzProbability(f *testing.F) {
691691
estimator := BimodalEstimator{
692-
BimodalConfig: BimodalConfig{BimodalScaleMsat: scale},
692+
BimodalConfig: BimodalConfig{BimodalScaleMsat: 400_000},
693693
}
694694

695695
f.Fuzz(func(t *testing.T, capacity, successAmt, failAmt, amt uint64) {

0 commit comments

Comments
 (0)