lightningd/plugin.c: Add important plugins, which if they terminate, lightningd also terminates.

Changelog-Added: New option `--important-plugin` loads a plugin is so important that if it dies, `lightningd` will exit rather than continue.  You can still `--disable-plugin` it, however, which trumps `--important-plugin` and it will not be started at all.
This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-07-29 19:24:07 +08:00
committed by neil saitug
parent 50600dce95
commit a847487bbe
7 changed files with 123 additions and 24 deletions

View File

@@ -833,7 +833,7 @@ def test_listconfigs(node_factory, bitcoind, chainparams):
# Test one at a time.
for c in configs.keys():
if c.startswith('#') or c.startswith('plugins'):
if c.startswith('#') or c.startswith('plugins') or c == 'important-plugins':
continue
oneconfig = l1.rpc.listconfigs(config=c)
assert(oneconfig[c] == configs[c])