mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 17:44:47 +01:00
3e3b05e1b2
`pylightning` is not much more than an alias for `pyln-client`, so this removes the need to install that as well just to run the tests.
20 lines
502 B
Python
Executable File
20 lines
502 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Simple plugin to test that lightningd doesnt crash if it starts a
|
|
misbehaving plugin via RPC.
|
|
"""
|
|
|
|
from pyln.client import Plugin
|
|
import an_unexistent_module_that_will_make_me_crash
|
|
|
|
plugin = Plugin(dynamic=False)
|
|
|
|
|
|
@plugin.init()
|
|
def init(options, configuration, plugin):
|
|
plugin.log("broken.py initializing {}".format(configuration))
|
|
# We need to actually use the import to pass source checks..
|
|
an_unexistent_module_that_will_make_me_crash.hello()
|
|
|
|
|
|
plugin.run()
|