routing: add test for fuzz test special case

This commit is contained in:
bitromortac 2024-11-07 11:56:46 +01:00
parent 797e8c5002
commit c8b989a75c
No known key found for this signature in database
GPG key ID: 1965063FC13BEBE2

View file

@ -309,6 +309,20 @@ func TestIntegral(t *testing.T) {
} }
} }
// TestSpecialCase tests a value combination found by fuzz tests.
func TestSpecialCase(t *testing.T) {
estimator := BimodalEstimator{
BimodalConfig: BimodalConfig{
BimodalScaleMsat: lnwire.MilliSatoshi(400_000),
},
}
_, err := estimator.probabilityFormula(
1_000_000_000, 300_000_000, 400_000_000, 300_000_000,
)
require.Error(t, err)
}
// TestCanSend tests that the success amount drops to zero over time. // TestCanSend tests that the success amount drops to zero over time.
func TestCanSend(t *testing.T) { func TestCanSend(t *testing.T) {
t.Parallel() t.Parallel()