Logo
Explore Help
Sign In
davide/palladum-lightning
1
0
Fork 0
You've already forked palladum-lightning
Code Issues Pull Requests Actions 5 Packages Projects Releases Wiki Activity
Files
9bb2b4a9098d6d3e4c19bf9ec00c7c9794cb858f
palladum-lightning/tests/plugins/custommsg_a.py

17 lines
327 B
Python
Raw Normal View History

pytest: Add a plugin for custommsgs and check that they get the msgs This completes the custommsg epic, finally we are back where we began all that time ago (about 4 hours really...): in a plugin that implements some custom logic.
2019-12-05 00:16:11 +01:00
#!/usr/bin/env python3
from pyln.client import Plugin
plugin = Plugin()
@plugin.hook('custommsg')
def on_custommsg(peer_id, message, plugin, **kwargs):
pytest: custommsg chainable tests
2021-01-27 12:56:29 +01:00
plugin.log("Got custommessage_a {msg} from peer {peer_id}".format(
pytest: Add a plugin for custommsgs and check that they get the msgs This completes the custommsg epic, finally we are back where we began all that time ago (about 4 hours really...): in a plugin that implements some custom logic.
2019-12-05 00:16:11 +01:00
msg=message,
peer_id=peer_id
))
feat: make custommsg hook chainable Changelog-Changed: custommsg hook is now chainable
2021-01-27 12:49:55 +01:00
return {'result': 'continue'}
pytest: Add a plugin for custommsgs and check that they get the msgs This completes the custommsg epic, finally we are back where we began all that time ago (about 4 hours really...): in a plugin that implements some custom logic.
2019-12-05 00:16:11 +01:00
plugin.run()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 487ms Template: 20ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API