core-lightning/tests/plugins/custommsg_b.py
2021-01-29 13:37:42 +10:30

17 lines
327 B
Python
Executable File

#!/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()