mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pytest: custommsg chainable tests
This commit is contained in:
committed by
Rusty Russell
parent
4e8d3f395b
commit
67f2939540
16
tests/plugins/custommsg_b.py
Executable file
16
tests/plugins/custommsg_b.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.hook('custommsg')
|
||||
def on_custommsg(peer_id, message, plugin, **kwargs):
|
||||
plugin.log("Got custommessage_b {msg} from peer {peer_id}".format(
|
||||
msg=message,
|
||||
peer_id=peer_id
|
||||
))
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user