Browse Source
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>plugin-timeout-inc
Rene Pickhardt
6 years ago
committed by
Christian Decker
1 changed files with 7 additions and 3 deletions
Loading…
Reference in new issue