Rusty Russell
4 years ago
committed by
neil saitug
3 changed files with 55 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
from pyln.client import Plugin |
||||
|
|
||||
|
"""A simple plugin that must come before dep_e. |
||||
|
""" |
||||
|
plugin = Plugin() |
||||
|
|
||||
|
|
||||
|
@plugin.hook('htlc_accepted', before=['dep_e.py']) |
||||
|
def on_htlc_accepted(htlc, plugin, **kwargs): |
||||
|
print("htlc_accepted called") |
||||
|
return {'result': 'continue'} |
||||
|
|
||||
|
|
||||
|
plugin.run() |
@ -0,0 +1,15 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
from pyln.client import Plugin |
||||
|
|
||||
|
"""A simple plugin that registers an htlc_accepted hook.. |
||||
|
""" |
||||
|
plugin = Plugin() |
||||
|
|
||||
|
|
||||
|
@plugin.hook('htlc_accepted') |
||||
|
def on_htlc_accepted(htlc, plugin, **kwargs): |
||||
|
print("htlc_accepted called") |
||||
|
return {'result': 'continue'} |
||||
|
|
||||
|
|
||||
|
plugin.run() |
Loading…
Reference in new issue