mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-01 03:24:41 +01:00
6b5db38774
After this code change people can use `plugin.rpc` from anywhere in their plugin code this is much nicer than going this way: ``` @plugin.method("init") def init(options, configuration, plugin): global rpc basedir = plugin.lightning_dir rpc_filename = plugin.rpc_filename path = os.path.join(basedir, rpc_filename) rpc = LightningRpc(path) ``` or similarly that way: ``` @plugin.method("init") def init(options, configuration, plugin): global rpc basedir = configuration['lightning-dir'] rpc_filename = configuration['rpc-file'] path = os.path.join(basedir, rpc_filename) rpc = LightningRpc(path) ``` Also the imports have been sorted alphabetically Co-authored-by: Rene Pickhardt <rene@rene-pickhardt.de> Co-authored-by: Christian Decker <decker.christian@gmail.com> |
||
---|---|---|
.. | ||
__init__.py | ||
lightning.py | ||
plugin.py | ||
test_plugin.py |