Skip to content

Commit 843e502

Browse files
committed
lncfg: validate BlindedPaths.MaxNumPaths
Assert that the BlindedPaths.MaxNumPaths value is non-zero.
1 parent fb67c47 commit 843e502

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lncfg/routing.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func (r *Routing) Validate() error {
3434
"number of hops expected to be included in each path")
3535
}
3636

37+
if r.BlindedPaths.MaxNumPaths == 0 {
38+
return fmt.Errorf("blinded max num paths cannot be 0")
39+
}
40+
3741
if r.BlindedPaths.PolicyIncreaseMultiplier < 1 {
3842
return fmt.Errorf("the blinded route policy increase " +
3943
"multiplier must be greater than or equal to 1")

0 commit comments

Comments
 (0)