-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightningd/plugin_hook.c: Make
db_write
a chained hook.
Fixes: #4219 Changelog-Changed: Plugins: Multiple plugins can now register `db_write` hooks.
- Loading branch information
Showing
4 changed files
with
108 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters