rpcserver: validate FinalCltvDelta and CltvLimit for REST
Missed this check in PR #5293.
This commit is contained in:
1 file changed
+8
@@ -4339,6 +4339,14 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user