mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: peer_connected chainable tests
This commit is contained in:
committed by
Rusty Russell
parent
91bdb6d2d9
commit
bc40287ade
17
tests/plugins/peer_connected_logger_a.py
Executable file
17
tests/plugins/peer_connected_logger_a.py
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Simple plugin to log the connected_hook.
|
||||
|
||||
"""
|
||||
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.hook('peer_connected')
|
||||
def on_connected(peer, plugin, **kwargs):
|
||||
print("peer_connected_logger_a {}".format(peer['id']))
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user