mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
plugins: add feature_set to init object.
Shows what features we use in various contexts, including those added by plugins in getmanifest. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugin: `feature_set` object added to `init`
This commit is contained in:
17
tests/plugins/show_feature_set.py
Executable file
17
tests/plugins/show_feature_set.py
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.init()
|
||||
def init(options, configuration, plugin):
|
||||
plugin.feature_set = configuration['feature_set']
|
||||
|
||||
|
||||
@plugin.method('getfeatureset')
|
||||
def getfeatureset(plugin):
|
||||
return plugin.feature_set
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user