mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
pytest plugins: use the standard 'no operation' syntax for hooks
This commit is contained in:
parent
6e34aa233a
commit
9030e5d779
@ -47,7 +47,7 @@ def db_write(plugin, writes, **kwargs):
|
||||
|
||||
plugin.conn.execute("COMMIT;")
|
||||
|
||||
return True
|
||||
return {"result": "continue"}
|
||||
|
||||
|
||||
plugin.add_option('dblog-file', None, 'The db file to create.')
|
||||
|
@ -11,7 +11,7 @@ plugin = Plugin()
|
||||
@plugin.hook('invoice_payment')
|
||||
def on_payment(payment, plugin, **kwargs):
|
||||
time.sleep(float(plugin.get_option('holdtime')))
|
||||
return {}
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.add_option('holdtime', '10', 'The time to hold invoice for.')
|
||||
|
@ -20,7 +20,7 @@ def on_payment(payment, plugin, **kwargs):
|
||||
WIRE_TEMPORARY_NODE_FAILURE = 0x2002
|
||||
return {'failure_code': WIRE_TEMPORARY_NODE_FAILURE}
|
||||
|
||||
return {}
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
|
@ -24,7 +24,7 @@ def on_rpc_command(plugin, rpc_command, **kwargs):
|
||||
elif request["method"] == "help":
|
||||
request["method"] = "autocleaninvoice"
|
||||
return {"replace": request}
|
||||
return {"continue": True}
|
||||
return {"result": "continue"}
|
||||
|
||||
|
||||
plugin.run()
|
||||
|
Loading…
Reference in New Issue
Block a user