Browse Source

lightningd: initialize global chainparams in main.

Otherwise the global is only set when passing the '--network' startup
option, hence causing a segfault when not passed.
travis-debug
darosior 5 years ago
committed by Rusty Russell
parent
commit
3ca7150c03
  1. 4
      lightningd/lightningd.c

4
lightningd/lightningd.c

@ -665,6 +665,10 @@ int main(int argc, char *argv[])
* variables. */
ld = new_lightningd(NULL);
/*~ The global chainparams is needed to init subdaemons, and defaults
* to testnet. */
chainparams = chainparams_for_network("testnet");
/* Figure out where our daemons are first. */
ld->daemon_dir = find_daemon_dir(ld, argv[0]);
if (!ld->daemon_dir)

Loading…
Cancel
Save