mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
lightningd: add --dev-no-version-checks, use if SLOW_MACHINE and VALGRIND
Reduces VALGRIND=1 node_factory.line_graph(5) time on my laptop from 42s to 36s. This is simply because forking all the subdaemons just to check the version is very expensive under valgrind. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
c85a433d9a
commit
1274d34822
@@ -139,6 +139,7 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
|
||||
ld->dev_force_channel_secrets_shaseed = NULL;
|
||||
ld->dev_force_tmp_channel_id = NULL;
|
||||
ld->dev_no_htlc_timeout = false;
|
||||
ld->dev_no_version_checks = false;
|
||||
#endif
|
||||
|
||||
/*~ These are CCAN lists: an embedded double-linked list. It's not
|
||||
@@ -820,8 +821,13 @@ int main(int argc, char *argv[])
|
||||
* daemon running, so we call before doing almost anything else. */
|
||||
pidfile_create(ld);
|
||||
|
||||
/*~ Make sure we can reach the subdaemons, and versions match. */
|
||||
test_subdaemons(ld);
|
||||
/*~ Make sure we can reach the subdaemons, and versions match.
|
||||
* This can be turned off in DEVELOPER builds with --dev-skip-version-checks,
|
||||
* but the `dev_no_version_checks` field of `ld` doesn't even exist
|
||||
* if DEVELOPER isn't defined, so we use IFDEV(devoption,non-devoption):
|
||||
*/
|
||||
if (IFDEV(!ld->dev_no_version_checks, 1))
|
||||
test_subdaemons(ld);
|
||||
|
||||
/*~ Set up the HSM daemon, which knows our node secret key, so tells
|
||||
* us who we are.
|
||||
|
||||
Reference in New Issue
Block a user