Browse Source

pylightning: add missing arguments to getroute

ppa-0.6.1
gallizoltan 7 years ago
committed by Christian Decker
parent
commit
1220a4eb1d
  1. 12
      contrib/pylightning/lightning/lightning.py

12
contrib/pylightning/lightning/lightning.py

@ -128,16 +128,22 @@ class LightningRpc(UnixDomainSocketRpc):
} }
return self.call("listnodes", payload) return self.call("listnodes", payload)
def getroute(self, peer_id, msatoshi, riskfactor, cltv=9): def getroute(self, peer_id, msatoshi, riskfactor, cltv=9, fromid=None, fuzzpercent=None, seed=None):
""" """
Show route to {id} for {msatoshi}, using {riskfactor} and optional Show route to {id} for {msatoshi}, using {riskfactor} and optional
{cltv} (default 9) {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.
""" """
payload = { payload = {
"id": peer_id, "id": peer_id,
"msatoshi": msatoshi, "msatoshi": msatoshi,
"riskfactor": riskfactor, "riskfactor": riskfactor,
"cltv": cltv "cltv": cltv,
"fromid": fromid,
"fuzzpercent": fuzzpercent,
"seed": seed
} }
return self.call("getroute", payload) return self.call("getroute", payload)

Loading…
Cancel
Save