From 55e7343b148fa6777ffdb0fd4f892c6dccf7f3fc Mon Sep 17 00:00:00 2001 From: bitromortac Date: Tue, 2 Jan 2024 17:28:16 +0100 Subject: [PATCH] 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. --- routing/probability_bimodal_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/routing/probability_bimodal_test.go b/routing/probability_bimodal_test.go index 645aa2d56..259c133fc 100644 --- a/routing/probability_bimodal_test.go +++ b/routing/probability_bimodal_test.go @@ -11,10 +11,10 @@ import ( ) const ( - smallAmount = lnwire.MilliSatoshi(400_000) - largeAmount = lnwire.MilliSatoshi(5_000_000) - capacity = lnwire.MilliSatoshi(10_000_000) - scale = lnwire.MilliSatoshi(400_000) + smallAmount = lnwire.MilliSatoshi(400_000_000) + largeAmount = lnwire.MilliSatoshi(5_000_000_000) + capacity = lnwire.MilliSatoshi(10_000_000_000) + scale = lnwire.MilliSatoshi(400_000_000) ) // TestSuccessProbability tests that we get correct probability estimates for @@ -689,7 +689,7 @@ func TestLocalPairProbability(t *testing.T) { // FuzzProbability checks that we don't encounter errors related to NaNs. func FuzzProbability(f *testing.F) { estimator := BimodalEstimator{ - BimodalConfig: BimodalConfig{BimodalScaleMsat: scale}, + BimodalConfig: BimodalConfig{BimodalScaleMsat: 400_000}, } f.Fuzz(func(t *testing.T, capacity, successAmt, failAmt, amt uint64) {