Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylightning: update getroute() parameters #2478

Merged
merged 2 commits into from Mar 19, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -302,13 +302,14 @@ def listnodes(self, node_id=None):
}
return self.call("listnodes", payload)

def getroute(self, node_id, msatoshi, riskfactor, cltv=9, fromid=None, fuzzpercent=None, seed=None, exclude=[]):
def getroute(self, node_id, msatoshi, riskfactor, cltv=9, fromid=None, fuzzpercent=None, exclude=[], maxhops=20):
"""
Show route to {id} for {msatoshi}, using {riskfactor} and optional
{cltv} (default 9). If specified search from {fromid} otherwise use
this node as source. Randomize the route with up to {fuzzpercent}
(0.0 -> 100.0, default 5.0) using {seed} as an arbitrary-size string
seed. {exclude} is an optional array of scid/direction to exclude.
(0.0 -> 100.0, default 5.0). {exclude} is an optional array of
scid/direction to exclude. Limit the number of hops in the route to
{maxhops}.
"""
payload = {
"id": node_id,
@@ -317,8 +318,8 @@ def getroute(self, node_id, msatoshi, riskfactor, cltv=9, fromid=None, fuzzperce
"cltv": cltv,
"fromid": fromid,
"fuzzpercent": fuzzpercent,
"seed": seed,
"exclude": exclude
"exclude": exclude,
"maxhops": maxhops
}
return self.call("getroute", payload)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.