mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
Merge pull request #9086 from morehouse/fix_fuzz_probability
routing: skip fuzzing when capacity is 0
This commit is contained in:
commit
a6e65d49cc
@ -692,10 +692,11 @@ func FuzzProbability(f *testing.F) {
|
||||
BimodalConfig: BimodalConfig{BimodalScaleMsat: scale},
|
||||
}
|
||||
|
||||
// We don't start fuzzing at zero, because that would cause an error.
|
||||
f.Add(uint64(1), uint64(0), uint64(0), uint64(0))
|
||||
|
||||
f.Fuzz(func(t *testing.T, capacity, successAmt, failAmt, amt uint64) {
|
||||
if capacity == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
_, err := estimator.probabilityFormula(
|
||||
lnwire.MilliSatoshi(capacity),
|
||||
lnwire.MilliSatoshi(successAmt),
|
||||
|
Loading…
Reference in New Issue
Block a user