mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
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.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user