2

I am trying to use the getroute command, specified as such:

getroute id msatoshi riskfactor [cltv] [fromid] [fuzzpercent] [exclude] [maxhops]
  1. Do I need to include all the elements above, or can I ignore the optional elements (which I understand to be the ones in square brackets) and rely on their default values?
  2. If I can ignore the optional elements, how do I do that?
  3. How can i specify the exclude parameter? I had an error trying with:
    getroute 024...a67 1000000sat 10 exclude="687193x890x0/0, 687193x890x0/1"
    

(I am using Spark wallet's RPC console, FYI.)

0

Not sure about how Spark Wallet handles this. Using C-lightning RPC interface you can avoid specifying optional parameters, just by not specifying them.

For your usage question, please refer to the manual. It specifies that exclude must be a JSON array and even gives you an example:

[“564334x877x1/0”,“564195x1292x0/1”]
3
  • Thanks. When I enter the above, including the square brackets, I get the following error: exclude: should be an array: invalid token '"[“687193x890x0/0”,“687193x890x0/1”]"'
    – runam0k
    Jun 23 '21 at 10:23
  • This is a quote escape issue. Use single quotes around the array. Jun 23 '21 at 10:36
  • Thanks. I included single quotes around the array - '["687193x890x0/0","687193x890x0/1"]' - and now get the error: exclude: should be an array: invalid token '"[\"687193x890x0/0\",\"687193x890x0/1\"]"'
    – runam0k
    Jun 23 '21 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.