Skip to content

Commit dc88c35

Browse files
committed
channeld: Do not fail if we get a chain_hash we don't know
1 parent e10cde3 commit dc88c35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/initial_channel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ struct channel *new_initial_channel(const tal_t *ctx,
6161
= commit_number_obscurer(&channel->basepoints[funder].payment,
6262
&channel->basepoints[!funder].payment);
6363
channel->chainparams = chainparams_by_chainhash(chain_hash);
64-
assert(channel->chainparams != NULL);
64+
if (channel->chainparams == NULL)
65+
return tal_free(channel);
6566

6667
return channel;
6768
}

0 commit comments

Comments
 (0)