rename block_processed to block_added

This commit is contained in:
fiatjaf
2022-09-12 17:43:54 -03:00
committed by neil saitug
parent 9b33a921f0
commit 1ef8fb7ef8
6 changed files with 17 additions and 17 deletions

22
tests/plugins/block_added.py Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python3
from pyln.client import Plugin
plugin = Plugin()
blocks_catched = []
@plugin.subscribe("block_added")
def notify_block_added(plugin, block, **kwargs):
global blocks_catched
blocks_catched.append(block["height"])
@plugin.method("blockscatched")
def return_moves(plugin):
return blocks_catched
plugin.run()