You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
374 B
19 lines
374 B
6 years ago
|
#!/usr/bin/env python3
|
||
|
"""Simple plugin to allow testing while closing of HTLC is delayed.
|
||
|
"""
|
||
|
|
||
|
from lightning import Plugin
|
||
|
import time
|
||
|
|
||
|
plugin = Plugin()
|
||
|
|
||
|
|
||
|
@plugin.hook('invoice_payment')
|
||
|
def on_payment(payment, plugin):
|
||
|
time.sleep(float(plugin.get_option('holdtime')))
|
||
|
return {}
|
||
|
|
||
|
|
||
|
plugin.add_option('holdtime', '10', 'The time to hold invoice for.')
|
||
|
plugin.run()
|