rpcserver: validate FinalCltvDelta and CltvLimit for REST

Missed this check in PR #5293.
This commit is contained in:
eugene committed 2021-08-11 15:37:53 -04:00
1 parent 07fa98fca5
commit d0191cb5ed
1 file changed
+8
+8
View File
@@ -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
}