mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-01 02:30:28 +02:00
rpcserver: validate FinalCltvDelta and CltvLimit for REST
Missed this check in PR #5293.
This commit is contained in:
parent
07fa98fca5
commit
d0191cb5ed
@ -4339,6 +4339,14 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
|
|||||||
return payIntent, err
|
return payIntent, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do bounds checking with the block padding.
|
||||||
|
err = routing.ValidateCLTVLimit(
|
||||||
|
payIntent.cltvLimit, payIntent.cltvDelta, true,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return payIntent, err
|
||||||
|
}
|
||||||
|
|
||||||
return payIntent, nil
|
return payIntent, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user