mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
4e5e38f4b0
tests: notification response fixes
23 lines
362 B
Python
Executable File
23 lines
362 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from pyln.client import Plugin
|
|
|
|
|
|
plugin = Plugin()
|
|
|
|
blocks_catched = []
|
|
|
|
|
|
@plugin.subscribe("block_added")
|
|
def notify_block_added(plugin, block_added, **kwargs):
|
|
global blocks_catched
|
|
blocks_catched.append(block_added["height"])
|
|
|
|
|
|
@plugin.method("blockscatched")
|
|
def return_moves(plugin):
|
|
return blocks_catched
|
|
|
|
|
|
plugin.run()
|