rpcserver+routerrpc: remove payment limit
This commit is contained in:
5 files changed
+5
-49
No files matched your search
@@ -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
|
||||
|
||||
@@ -186,9 +186,8 @@ func testQueryRoutes(t *testing.T, useMissionControl bool, useMsat bool) {
|
||||
}
|
||||
|
||||
backend := &RouterBackend{
|
||||
MaxPaymentMSat: lnwire.NewMSatFromSatoshis(1000000),
|
||||
FindRoute: findRoute,
|
||||
SelfNode: route.Vertex{1, 2, 3},
|
||||
FindRoute: findRoute,
|
||||
SelfNode: route.Vertex{1, 2, 3},
|
||||
FetchChannelCapacity: func(chanID uint64) (
|
||||
btcutil.Amount, error) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user