mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
lncfg: validate BlindedPaths.MaxNumPaths
Assert that the BlindedPaths.MaxNumPaths value is non-zero.
This commit is contained in:
@@ -34,6 +34,10 @@ func (r *Routing) Validate() error {
|
|||||||
"number of hops expected to be included in each path")
|
"number of hops expected to be included in each path")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.BlindedPaths.MaxNumPaths == 0 {
|
||||||
|
return fmt.Errorf("blinded max num paths cannot be 0")
|
||||||
|
}
|
||||||
|
|
||||||
if r.BlindedPaths.PolicyIncreaseMultiplier < 1 {
|
if r.BlindedPaths.PolicyIncreaseMultiplier < 1 {
|
||||||
return fmt.Errorf("the blinded route policy increase " +
|
return fmt.Errorf("the blinded route policy increase " +
|
||||||
"multiplier must be greater than or equal to 1")
|
"multiplier must be greater than or equal to 1")
|
||||||
|
Reference in New Issue
Block a user