lightningd/plugin.c: Make builtin plugins important.

Changelog-Changed: plugin: Builtin plugins are now marked as important, and if they crash, will cause C-lightning to stop as well.
This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-07-30 14:04:59 +08:00
committed by neil saitug
parent 48f36904c8
commit 4ca2e49812
6 changed files with 29 additions and 8 deletions

View File

@@ -844,9 +844,9 @@ def test_listconfigs_plugins(node_factory, bitcoind, chainparams):
# assert that we have pay plugin and that plugins have a name and path
configs = l1.rpc.listconfigs()
assert configs['plugins']
assert len([p for p in configs['plugins'] if p['name'] == "pay"]) == 1
for p in configs['plugins']:
assert configs['important-plugins']
assert len([p for p in configs['important-plugins'] if p['name'] == "pay"]) == 1
for p in configs['important-plugins']:
assert p['name'] and len(p['name']) > 0
assert p['path'] and len(p['path']) > 0
assert os.path.isfile(p['path']) and os.access(p['path'], os.X_OK)