mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
plugin: sort topological candidates by specified order.
We previously registered hooks up in who-replies-to-getmanifest-first order, but then if any had dependencies it would scatter that order. This allows users to manually set dependencies developers have forgotten by specifying the plugins manually in their configuration or cmdline. This was an excellent consideration by @mschmook. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
d429e21db3
commit
fb295ffb51
@@ -50,6 +50,9 @@ struct plugin {
|
||||
|
||||
enum plugin_state plugin_state;
|
||||
|
||||
/* Our unique index, which is default hook ordering. */
|
||||
u64 index;
|
||||
|
||||
/* If this plugin can be restarted without restarting lightningd */
|
||||
bool dynamic;
|
||||
|
||||
@@ -113,6 +116,9 @@ struct plugins {
|
||||
/* Whether we are shutting down (`plugins_free` is called) */
|
||||
bool shutdown;
|
||||
|
||||
/* Index to show what order they were added in */
|
||||
u64 plugin_idx;
|
||||
|
||||
#if DEVELOPER
|
||||
/* Whether builtin plugins should be overridden as unimportant. */
|
||||
bool dev_builtin_plugins_unimportant;
|
||||
|
||||
Reference in New Issue
Block a user