openingd: Tentatively accept zeroconf when proposed

We then still use our own minimum_depth to enforce our security. There
is no harm in accepting theirs
This commit is contained in:
Christian Decker 2023-08-17 18:23:26 +02:00 committed by Rusty Russell
parent 685c413b61
commit 6bc71796c8

View file

@ -965,12 +965,16 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg)
*/
if (open_tlvs->channel_type) {
open_channel_had_channel_type = true;
/* Tentatively accept OPT_ZEROCONF. We'll check
* further down again. This is required because we
* haven't talked to the openchannel hook at this
* point. */
state->channel_type =
channel_type_accept(state,
open_tlvs->channel_type,
state->our_features,
state->their_features,
state->minimum_depth == 0);
true);
if (!state->channel_type) {
negotiation_failed(state,
"Did not support channel_type %s",