-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`
- Loading branch information
1 parent
eb80412
commit f692220
Showing
3 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
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