Skip to content

Commit ee3133f

Browse files
rustyrussellendothermicdev
authored andcommitted
lightningd: increase startup time for plugins to 120 seconds.
Raspberry Pi, with bitcoind running and full gossip topology may actually hit this, and we have a report in practice. Note that the comment is wrong, so fix that too. Fixes: #7724 Reported-by: m-schmoock Signed-off-by: Rusty Russell <[email protected]>
1 parent 7a1b126 commit ee3133f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: lightningd/plugin.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,9 @@
3333
/* Only this file can include this generated header! */
3434
# include <plugins/list_of_builtin_plugins_gen.h>
3535

36-
/* How many seconds may the plugin take to reply to the `getmanifest`
37-
* call? This is the maximum delay to `lightningd --help` and until
38-
* we can start the main `io_loop` to communicate with peers. If this
39-
* hangs we can't do much, so we put an upper bound on the time we're
40-
* willing to wait. Plugins shouldn't do any initialization in the
41-
* `getmanifest` call anyway, that's what `init` is for. */
42-
#define PLUGIN_MANIFEST_TIMEOUT 60
36+
/* How many seconds may the plugin take frome the `getmanifest`
37+
* call to replying to the init call? */
38+
#define PLUGIN_STARTUP_TIMEOUT 120
4339

4440
static void memleak_help_pending_requests(struct htable *memtable,
4541
struct plugin *plugin)
@@ -2012,7 +2008,7 @@ static void plugin_set_timeout(struct plugin *p)
20122008
else {
20132009
p->timeout_timer
20142010
= new_reltimer(p->plugins->ld->timers, p,
2015-
time_from_sec(PLUGIN_MANIFEST_TIMEOUT),
2011+
time_from_sec(PLUGIN_STARTUP_TIMEOUT),
20162012
plugin_manifest_timeout, p);
20172013
}
20182014
}

0 commit comments

Comments
 (0)