mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
20 lines
361 B
Python
Executable File
20 lines
361 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Plugin to test openchannel_hook
|
|
|
|
Will simply accept any channel. Useful fot testing chained hook.
|
|
"""
|
|
|
|
from pyln.client import Plugin
|
|
|
|
plugin = Plugin()
|
|
|
|
|
|
@plugin.hook('openchannel')
|
|
def on_openchannel(openchannel, plugin, **kwargs):
|
|
msg = "accept on principle"
|
|
plugin.log(msg)
|
|
return {'result': 'continue'}
|
|
|
|
|
|
plugin.run()
|