mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
Pylightning: update to use the 'dev' multiplex command
Update 'dev_crash()' and 'dev_rhash()' methods which used outdated RPC commands, add the missing 'dev_slowcmd()' method.
This commit is contained in:
parent
f3f33dceb1
commit
ed63496152
@ -366,7 +366,10 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
"""
|
||||
Crash lightningd by calling fatal()
|
||||
"""
|
||||
return self.call("dev-crash")
|
||||
payload = {
|
||||
"subcommand": "crash"
|
||||
}
|
||||
return self.call("dev", payload)
|
||||
|
||||
def dev_fail(self, peer_id):
|
||||
"""
|
||||
@ -427,9 +430,10 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
Show SHA256 of {secret}
|
||||
"""
|
||||
payload = {
|
||||
"subcommand": "rhash",
|
||||
"secret": secret
|
||||
}
|
||||
return self.call("dev-rhash", payload)
|
||||
return self.call("dev", payload)
|
||||
|
||||
def dev_sign_last_tx(self, peer_id):
|
||||
"""
|
||||
@ -440,6 +444,16 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("dev-sign-last-tx", payload)
|
||||
|
||||
def dev_slowcmd(self, msec=None):
|
||||
"""
|
||||
Torture test for slow commands, optional {msec}
|
||||
"""
|
||||
payload = {
|
||||
"subcommand": "slowcmd",
|
||||
"msec": msec
|
||||
}
|
||||
return self.call("dev", payload)
|
||||
|
||||
def disconnect(self, peer_id, force=False):
|
||||
"""
|
||||
Disconnect from peer with {peer_id}, optional {force} even if has active channel
|
||||
|
Loading…
Reference in New Issue
Block a user