diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go index 9cf2c710..66b7244c 100644 --- a/lnrpc/routerrpc/router_backend.go +++ b/lnrpc/routerrpc/router_backend.go @@ -13,6 +13,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/feature" "github.com/lightningnetwork/lnd/htlcswitch" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lntypes" @@ -757,6 +758,14 @@ func (r *RouterBackend) extractIntentFromSendRequest( return nil, err } + // Validate the features if any was specified. + if features != nil { + err = feature.ValidateDeps(features) + if err != nil { + return nil, err + } + } + // If the payment addresses is specified, then we'll also // populate that now as well. if len(rpcPayReq.PaymentAddr) != 0 {