openingd: correctly mark channel type zeroconf if negotiated and they offered minimum_depth=0.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: `channel_type` reflects option_zeroconf if explicitly negotiated.
This commit is contained in:
Rusty Russell 2024-01-29 10:04:16 +10:30
parent f450dfeb55
commit 031524fab5

View file

@ -568,6 +568,9 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags,
status_debug(
"We negotiated option_zeroconf, using our minimum_depth=%d",
state->minimum_depth);
/* We set this now to show we're zeroconf */
if (their_mindepth == 0)
channel_type_set_zeroconf(state->channel_type);
} else {
state->minimum_depth = their_mindepth;
}