mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
routing: add test for fuzz test special case
This commit is contained in:
parent
797e8c5002
commit
c8b989a75c
1 changed files with 14 additions and 0 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue