diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index a78cfc69c..bb45b955f 100644 --- a/lightningd/lightningd.c +++ b/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)