rpcserver+routerrpc: remove payment limit

This commit is contained in:
Joost Jager
2020-05-28 19:28:34 +02:00
parent 24c865450a
commit df7a05da84
5 changed files with 5 additions and 49 deletions

View File

@@ -27,9 +27,6 @@ import (
// RouterBackend contains the backend implementation of the router rpc sub
// server calls.
type RouterBackend struct {
// MaxPaymentMSat is the largest payment permitted by the backend.
MaxPaymentMSat lnwire.MilliSatoshi
// SelfNode is the vertex of the node sending the payment.
SelfNode route.Vertex
@@ -143,10 +140,6 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
if err != nil {
return nil, err
}
if amt > r.MaxPaymentMSat {
return nil, fmt.Errorf("payment of %v is too large, max payment "+
"allowed is %v", amt, r.MaxPaymentMSat.ToSatoshis())
}
// Unmarshall restrictions from request.
feeLimit := lnrpc.CalculateFeeLimit(in.FeeLimit, amt)
@@ -489,13 +482,6 @@ func (r *RouterBackend) UnmarshallRoute(rpcroute *lnrpc.Route) (
return nil, err
}
if routeHop.AmtToForward > r.MaxPaymentMSat {
return nil, fmt.Errorf("payment of %v is too large, "+
"max payment allowed is %v",
routeHop.AmtToForward,
r.MaxPaymentMSat.ToSatoshis())
}
hops[i] = routeHop
prevNodePubKey = routeHop.PubKeyBytes