Files
palladum-lightning/tests/plugins/block_added.py
Lakshya Singh f442bd5012 fix: flake8 lint rules
Remove unnecessary global declarations across multiple test files. 
This change improves code quality by eliminating redundant global 
statements for variables that are already accessible in their 
respective scopes. Add proper type annotation for fees_from_status 
in test_closing.py and import the required typing modules. These 
changes maintain the same functionality while making the code cleaner 
and more compliant with Python best practices.
2025-08-11 11:06:22 +09:30

22 lines
336 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):
blocks_catched.append(block_added["height"])
@plugin.method("blockscatched")
def return_moves(plugin):
return blocks_catched
plugin.run()