pytest: test for accepting even unknown messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
13
tests/plugins/allow_even_msgs.py
Executable file
13
tests/plugins/allow_even_msgs.py
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin(custom_msgs=[43690])
|
||||
|
||||
|
||||
@plugin.hook('custommsg')
|
||||
def on_custommsg(peer_id, payload, plugin, message=None, **kwargs):
|
||||
plugin.log("Got message {}".format(int(payload[:4], 16)))
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user