mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
lightningd/plugin_hook.c: Make db_write a chained hook.
Fixes: #4219 Changelog-Changed: Plugins: Multiple plugins can now register `db_write` hooks.
This commit is contained in:
committed by
Rusty Russell
parent
904e110554
commit
32de621886
16
tests/plugins/dbdummy.py
Executable file
16
tests/plugins/dbdummy.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env python3
|
||||
'''This plugin is a do-nothing backup plugin which just checks that we
|
||||
can handle multiple backup plugins.
|
||||
'''
|
||||
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.hook('db_write')
|
||||
def db_write(plugin, **kwargs):
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user